How to add a special character between pages in the top nav bar?
-
Hi all,
I want to add a character, let’s say “|” between listing pages in the top bar, when using the wp_list_pages() function.
I’ve found some discussions about it, but no one had real good solution for me.I tried to use this code for example –
<?php $char = ' | '; wp_list_pages('link_before='.$char.'<span>&link_after=</span>'); ?>
The problem is the the character is being displayed very close to the page name, and I want it to be in the center between one page to another one.
Another problem with this, is that the character is part of the link, since it’s being added inside the a anchor tag, so even if there was a way to add some space between the character and the page name, it would all be part of the link to the page, which is not what I want..
Is there another way to do that? Or I will have to give up using the wp_list_pages() in this case and build a manual list? (which is also not so good at all..)
Thanks,
Maor
- The topic ‘How to add a special character between pages in the top nav bar?’ is closed to new replies.