Hi Scripty – I found your link and copied and pasted this into the sidebar of my site:
<?php wp_list_pages(‘title_li=<h2>MAIN NAV</h2>&depth=1’ ); ?>
<?php
if ($post->post_parent == 0) {
$children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
$parentpage = $wpdb->get_row(“SELECT ID, post_title, post_name FROM $wpdb->posts WHERE ID = ‘”.$post->ID.”‘”);
}
if ($post->post_parent != 0) {
$next_post_parent = $post->post_parent;
while ($next_post_parent != 0) {
$children = wp_list_pages(“title_li=&child_of=”.$next_post_parent.”&echo=0″);
$parentpage = $wpdb->get_row(“SELECT ID, post_title, post_parent, post_name FROM $wpdb->posts WHERE ID = ‘”.$next_post_parent.”‘”);
$next_post_parent = $parentpage->post_parent;
}
}
?>
<?php if ($children) { ?>
<?php } ?>
But nothing happens. What I’d like is to have the same set up you have – I’m using the simpleX theme, and my link is https://www.transformationacceleration.com — I know that WordPress is supposed to be simple, but I don’t understand what I’m doing at all.
I would be very grateful for any help you or anyone else could give me about how to make the parent-child page list show up in my sidebar. And my other question is, should that happen, will I automatically be able to go to the admin page and put in content?