Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6123

    Hi guys, i think the sidebar navigation for nested subpages its a good thing… but i need to get those ads to display first. So please let me know where in the code should i make changes for displaying the automatic sidebar navigation after the widgets… getting it in the midle would be more complicated, doesnt??

    many thanks.

    #52954

    Hey,

    open up sidebar.php and move following code:

    /*
    * Display a subnavigation for pages that is automatically generated, so the users doesnt need to work with widgets
    */
    if($subNav && isset($post) && is_object($post) && !empty($post->ID))
    {
    global $post;
    $subNav = false;
    $parent = $post->ID;

    if (!empty($post->post_parent))
    {
    $ancestors = get_post_ancestors($post->ID);
    $root = count($ancestors)-1;
    $parent = $ancestors[$root];
    }

    $children = wp_list_pages("title_li=&child_of=". $parent ."&echo=0");

    if ($children)
    {
    $default_sidebar = false;
    echo "<div class='widget widget_nav_menu'><ul class='nested_nav'>";
    echo $children;
    echo "</ul></div>";
    }
    }

    - i.e. put it before:

    //default dummy sidebar

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘moving sidebar navigation’ is closed to new replies.