configuring wp_list_pages()
-
Hi I have created a page structure which is two levels deep and will remain so. I have one sidebar navigation template page for all web pages in the wordpress site.
I wish to customise the left navigation page structure so that:
When I am on any other web page within the (wordpress) website other than those classified as a “page” I wish it to display just the parent page title links (not there children).
Once on a parent “page” i wish to display only the current parent page title link and its child page links.
On a child “page” i wish to display its parent category title link and all child pages links .
I am new to php and am struggling with this task.
The site i am working on can be found here: http://www.rememberremember.co.uk
This is the closes that I have got to it in PHP:
<?php
$children = wp_list_pages(‘title_li=&depth=1’ );
if($post->post_parent)
$children = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
else
$children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
if ($children) { ?>-
<?php echo $children; ?>
<?php } ?>
thanks in advance.
-
Since you are self-hosted and using the software downloaded from wordpress.ORG, you need to direct your question to http://wordpress.ORG/support/ . This forum is for users of WordPress.COM, the free hosting service, and it uses a modified multi-user version of the software which is different from what you are using and few, if any, here know anything about it.
-
- The topic ‘configuring wp_list_pages()’ is closed to new replies.