WordPress.org

Support

Support » Plugins and Hacks » Child pages on sidebar menu

Child pages on sidebar menu

  • I use Flexi Pages Widget to show on sidebar only these child pages what this menu pages has. Under one main menu whats called “Tooted ja teenused” on my site: http://www.kuuesmees.com/kanepiaiand/?page_id=4 I would like to have only “Tooted ja teenused” child pages. I did it with flexipages(‘exclude=.

    But problem comes that I would like to show on “Firmast” page also this menu page child pages but not ones from “Tooted ja teenused”.

    Right now I use this code:

    <div id=”sidebar”>

    <?php if($post->post_parent)
    $children = wp_list_pages(“sort_column=menu_order&title_li=&child_of=”.$post->post_parent.”&echo=0″);
    else
    $children = wp_list_pages(“sort_column=menu_order&title_li=&child_of=”.$post->ID.”&echo=0″); ?>
    <?php
    if ($children) { ?>

      <?php flexipages(‘exclude=2,8,6,20,22&show_subpages=1’); ?>

    <?php } ?>

    Can anybody help me with this code to fix it that on sidebar it shows only child pages that are greated under this menu page where you are.

    You click Menu 1, then on sidebar you show only Menu 1 child pages. When you click on Menu 2 then there shows up only Menu 2 pages, not also Menu 1 childs.

  • The topic ‘Child pages on sidebar menu’ is closed to new replies.
Skip to toolbar