• I’m building a site using WordPress as a CMS and have ran into a problem.

    I have a number of main pages that show in my horizontal menu at the top with dropdown subpages. In the sidebar, I want to diplay a parent page’s subpages as navigation links, with only those showing, no other pages visible at all.

    I have tried all the page menu widgets I could find and none accomplish exactly what I want. So what I would like to do is tweak the MultiPages widget to accomplish this, but I have no idea where to start.

    Does anyone have any suggestions or ideas?

Viewing 1 replies (of 1 total)
  • <?php
    if($post->post_parent)
    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
    $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    if ($children) { ?>
    <ul>
    <?php echo $children; ?>
    </ul>
    <?php } ?>

    This should do it, I guess…

Viewing 1 replies (of 1 total)
  • The topic ‘Show only subpages, no pages visible’ is closed to new replies.