Lpspider
Member
Posted 3 years ago #
I'm working on customizing the menu on a wordpress theme. I need css span to be applied inside the link. This works fine for normal links but for links from wp_list_pages it messes up the css.
<li><?php wp_list_pages('title_li='); ?></li>
<li><a href="#"><span>Title</span></a></li>
</ul>
The CSS shows up fine with the link "Title" but shows up incorrect for wp_list_pages.
Is there any way around this? Can I somehow edit the html around wp_list_pages to include span?
Thanks!
sancho320
Member
Posted 3 years ago #
I would also like to know how to adjust this. I have looked at the code within the functions file, but no luck. This would be a great help in adding dynamic width graphic buttons.
Thanks.
The following tutorial is about dynamic menu highlighting, but you'll get the drift - http://codex.wordpress.org/Dynamic_Menu_Highlighting
Good luck.
sancho320
Member
Posted 3 years ago #
Thanks, mercime, but not quite what I was looking for. It appears the answer lies in the classes.php file. For those interested, I tried this and it worked like a charm!
http://www.jasonwhitener.com/2008/02/01/wp_list_pages
niiiiiic
Member
Posted 3 years ago #
Thanks a ton Jason. A simple edit with the classes.php did the trick!
Garry Chahal
Member
Posted 3 years ago #
Create your navigation menu with ul or li tags, as we cant create a menu using span tag because WordPress generates the navigation menu dynamically from the database on the fly.