I found some code that I think will show a link back to parent page.
if ($post->post_parent) {
$parent = get_post($post->post_parent);
if ($parent->post_parent) {
$children = wp_list_pages("title_li=&child_of=".$parent->post_parent."&depth=1&echo=0&sort_column=menu_order");
} else {
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&depth=1&echo=0&sort_column=menu_order");
}
} else {
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1&sort_column=menu_order");
}
if ($children) echo "
" . $children . "
";
I tried having <?php at the start and ending with ?><?php } ?> and variations of that but keep breaking the site. How can I end the code so it will display?