Insert special characters between wordpress menus items

March 12, 2009 · Print This Article

The wp_list_pages function of wordpress is very useful, but sometimes it can be a bit frustrating.

For exemple when you want to insert characters as such as “//” between menu items.

Happilly, here is the solution to this problem.

To do so, simply paste the following code where you want your wordpress menu to be displayed.

<?php
$char = ' \\ ';
wp_list_pages('link_before=<li>&link_after='.$char.'</li>');
?>


Your choice for site templates and wordpress themes

Comments

Got something to say?

You must be logged in to post a comment.