WordPress.org

Ready to get started?Download WordPress

Forums

page in top pages + subpages in sidebar (1 post)

  1. ges
    Member
    Posted 8 years ago #

    Hello,

    I'm trying to have main pages show up in the Blix horizontal page menu while not displaying subpages there ( you can see those in the sidebar)

    in header.php i've been testing stuff out here, trying to set a condition to not display sub pages -

    else {
    (is_page($page_id))?$selected = ' class="selected"':$selected='';
    echo "<li".$selected.">$page_title\n";
    }

    becomes something like

    else {
    if($page_id->post_parent == 0) {
    (is_page($page_id))?$selected = ' class="selected"':$selected='';
    echo "<li".$selected.">$page_title\n";
    }

    but this doesn't work. i'm trying to write code to say display only if parent is the default value otherwise don't display.

    any help would be great.
    thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic