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

    Hi, I am finally getting around to getting my site done. I would like to remove the sub-navigation widget and use widget logic to populate sidebars and use things like “my page order” instead.

    When I follow your instructions from theme forest it removes all of my widgets, not just the hardcoded sub-navigation widget.

    “you can either get rid of sidebar.phps line 36-49 to remove the menu” This what is causing all widgets to go away.

    Line 36-49 for me as follows:

    <?php

    if($post->post_parent)

    $children = wp_list_pages(“title_li=&sort_column=menu_order&child_of=”.$post->post_parent.”&echo=0″);

    else

    $children = wp_list_pages(“title_li=&sort_column=menu_order&child_of=”.$post->ID.”&echo=0″);

    if ($children) { ?>

    <div class=”widget widget_pages”>

    <h3>Sub-Navigation</h3>

      <?php echo $children; ?>

    </div>

    <?php }

    thanks,

    Nigel

    #46467

    Hey,

    in sidebar.php replace the code you posted above:

    <div class='box box_small box3' id='sidebar' >
    <?php
    if($post->post_parent)
    $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
    else
    $children = wp_list_pages("title_li=&sort_column=menu_order&child_of=".$post->ID."&echo=0");
    if ($children) { ?>
    <div class="widget widget_pages">

    <h3>Sub-Navigation</h3>
    <ul>
    <?php echo $children; ?>
    </ul>
    </div>
    <?php }

    with:

    <?php

    All other widget areas should display correct now.

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

The topic ‘Remove Sub-Navigation Widget’ is closed to new replies.