Support » Plugins » Subpages on search results

  • I add subpages to my theme, and they are normally displayed except on search page. The page lists all subpages when showing search results for not found.
    I have this code in my header.php:


    <div >
    <ul id="mainmenu">

    <?php wp_list_pages('depth=1&title_li='); ?>

    <?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 id="submenu">
    <?php echo $children; ?>

    <?php } ?>

    <!-- SUBMENU -->

    </div><!--[if !IE]>end #main-menu<![endif]-->

    Thanx.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Subpages on search results’ is closed to new replies.