end php for a listing
-
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?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘end php for a listing’ is closed to new replies.