page in top pages subpages in sidebar
-
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.
- The topic ‘page in top pages subpages in sidebar’ is closed to new replies.