WordPress.org

Ready to get started?Download WordPress

Forums

Subpages on search results (4 posts)

  1. AmeoCrisp
    Member
    Posted 5 years ago #

    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.

  2. AmeoCrisp
    Member
    Posted 5 years ago #

    I mean it lists all links to subpages when showing search results for not found. Does anyone know..? Any help would be appreciated..

  3. AmeoCrisp
    Member
    Posted 5 years ago #

    Here it is:

    http://wordpress.org/support/topic/169603?replies=4

    Sorry for spamming:/

  4. AmeoCrisp
    Member
    Posted 5 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic

Tags