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
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘wp_list_pages()’ is closed to new replies.