tobydecks
Member
Posted 3 years ago #
Hi,
I wondered if there is a way of mixing up the pages and categories in my navigation sidebar.
I've used <?php wp_list_pages('title_li='); ?> and <?php wp_list_cats()?> to create the links in the navigation. What I want to do is this:
Home(page)
News(category)
Curriculum(page)
Teachers(page)
Vision(page)
Basically, I want to show the category in amongst the page listing.
I could hard code the links to the static pages into sidebar.php, but if the client wants to add a new page, it obvioulsy won't dynamically show up in the list.
Is there anything that can be done?
Cheers
Grab a plugin like Redirectify plugin, create the Page called News, save that page. Then edit that page and add a Custom Field with a Key of 'redirect' and a Value of the url for the News category.
Then use the Order in the Attributes when you edit your Pages and set that correctly, then with the template tag, wp_list_pages(), 'sort_column=menu_order' parameter.
Other plugins with similar solution:
http://wordpress.org/extend/plugins/page-links-to/
http://wordpress.org/extend/plugins/redirect/
tobydecks
Member
Posted 3 years ago #
Thanks Michael.
That worked perfectly :)