custom navigation error — what's wrong here?
-
<?php global $post; if($post->post_parent) { $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); $menu_title = get_the_title($post->post_parent); } if($children) { $menu_id = $post->ID; $menu_title = get_the_title($post->post_title); } else { $menu_id = $post->post_parent; $parent = get_post($menu_id); $menu_title =get_the_title($parent->post_title); } if ($children) { ?> <h3 class="secondHeader"> <a href="?page_id=<?php echo $menu_id; ?>"> <?php echo $menu_title; ?></a></h3> <ul class="secondMenu"> <?php wp_list_pages('title_li=&child_of=' . $menu_id); ?> </ul> <?php } ?>when i use this code, nothing displays. Not sure what’s wrong?
The topic ‘custom navigation error — what's wrong here?’ is closed to new replies.