I did that on this page: http://www.viper007bond.com/about/
And this is how I did it: http://www.viper007bond.com/wordpress/wp-content/themes/neat_1024/page-listchildren.phps
Doing it outside of The Loop would be trickier, but then again, since there is only one “post” per Page, there shouldn’t really be a need to do it outside of The Loop, that is unless you’re in a different file (such as header.php).
If that’s the case, reply and we’ll go about it a different way.
Many thanks for the response.
Executing the code within the loop is no problem however I what I would really like to do is be able to display a list of all the pages and sub pages within the section ‘about’ as opposed to a back button and the pages beneath it, although that is a great option.
For example if you had a structure like
/about
/about/company/
/about/company/people
You would get the same list regardless of which page you are on.
To do this I think you need to know the id of the page called ‘about’. You can then feed this into the “child_of” parmaeter of wp_list_pages. If however you are a few pages down the tree I am not sure how you can get the id of “about” as it is no longer the parent of the page you are on.
Would you have any idea how to do this? Thanks for your help, much appreciated.
Look further down the page to the Navigation part:
<?php wp_list_pages('child_of=' . $post->ID . '&sort_column=menu_order&depth=1&title_li='); ?>
(Dunno why I was thinking there was more code to that and therefore had to post the whole script contents…)
Thanks for that, I have used a modified version of your code for the “back up” link which I got from your posted code so it was worth the full post!