wp_list_pages()
-
Hi all 🙂
This is my first visit to this part – Sorry if this is the wrong place to post this…
I have little experience in the back end of WordPress and have come across a problem I can’t seem to solve with widgets and or plugins.
I’m trying to make it so that sub pages only show in the navigation list when I’m on a parent page or one of the sub pages that shares the same parent page. Can anyone point me in the right direction on what to change or add?
I have this code at the moment (from the template I’m adapting):
<div id="menu"> <?php $pages = get_pages(); //print_r($pages); //list_pages_by_category(0, true, true, '', '<br />', '<br />', true, false, false); ?> <ul class='pagelist'> <li class='pagecat'><br /><br /> <ul class='pagemain'> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <li><a href="<?php bloginfo('url'); ?>" <?php if (is_home()) echo " class=\"selected\""; ?> title="<?php bloginfo('name')?>: Startpage" >Home</a> </li> <?php $parent = ''; /* if(is_home()) { $parent = '&depth=1'; } else { $parent = '&child_of=' . $post->ID; } */ wp_list_pages('title_li=&sort_column=menu_order');� ?> <?php endif; ?> </ul> </li> </ul> </div>Thanks in advance for any help you can offer…
/Doug
-
Guess no one has any ideas?
Sorry, can’t help, but just wanted to say that this is an awesome idea! If you work out how to do it, please post back here. I would love to use this as well!!!
Frank
Have you tried this widget?
http://srinig.com/wordpress/plugins/flexi-pages/comment-page-22/
Cheers Frank – Excellent, well done! Thanks for sharing, seems to do the trick perfectly.
/Doug
The topic ‘wp_list_pages()’ is closed to new replies.