Support » Themes and Templates » PHP Custom Sidebar

  • I am new to PHP and WordPress. I am attempting to create a new sidebar theme to display the third tier of the menu when on the second tier. Example:


    Currently when I am on PAGE1; SUB1, 2 and 3 appear in the sidebar. however when I am on SUB2 only SUB1, 2 and 3 show up instead of THIRD1 and 2. I am pretty sure this is the PHP file that is giving me the issue. (below) Any help or suggestions would be appreciated. Thanks -Joey

    $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1&exclude=-107");
    $ancestors = end($post->ancestors);
    $children = wp_list_pages("title_li=&child_of=".$ancestors."&echo=0&depth=1&exclude=-107");
    if ($children) { ?>
    <ul class="subnav">
    <?php echo $children; ?>
    <?php } ?>

  • The topic ‘PHP Custom Sidebar’ is closed to new replies.