2

My navigation bar of my wordpress theme is set up to wp_list_pages. I'd like to display text underneath those page links.

Like:


Home

"Home Sweet Home"


Do I need a widget to accomplish this or is it relatively simple to implement?

1 Answer 1

1

Yes, but you need to use a custom walker. You must modify the function that traverse the page and output the HTML. Extend the basic wordpress class and implement your function.

See this stackechange post for a code example.

Note: I suggest you to use wp_nav_menu (custom menus) instead of wp_list_page and use the item description as your sub_menu item description.

4
  • I'm not as familiar with the WP Admin panel as I should be. Where can I change the links wp_nav_menu displays?
    – pope
    Jan 20, 2012 at 23:57
  • Using Appereance -> Menus, you can chose via drag and drop the pages. The link is the permalink of the page. If you want custom links, use the box custom links. To enter a description , enable the field Description in Screen Options
    – keatch
    Jan 21, 2012 at 0:01
  • Thanks, that was easy! Walkers however are not. Is there a tutorial out there you recommend? I've already google'd a few but I want to make sure I'm getting correct, up to date information.
    – pope
    Jan 21, 2012 at 0:30
  • See this answer for an example. I’ll keep it up to date if WordPress changes anything related.
    – fuxia
    Jan 21, 2012 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.