Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="leftNavContainer">
- <?php
- if ($post->post_parent !== 0) {
- $args = 'child_of=' . $post->post_parent;
- $CategoryName = get_the_title($post->post_parent);
- }
- else {
- $args = 'child_of=' . $post->ID;
- $CategoryName = get_the_title($ID);
- }
- $parent_link = get_permalink($post->post_parent);
- echo"<div class='leftNavInnerContainerHeader'><a href='".$parent_link."'>". $CategoryName ."</a></div>";
- echo"<div id='leftNavInnerContainerBody'>";
- echo"<ul>";
- $children = wp_list_pages($args . '&title_li=&depth=1');
- echo"</ul>";
- echo"</div>";
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement