Hiding pages from top nav
-
Hi
I’m editing a self hosted wordpress blog page with the code below. I’m trying ti hide a page from the nav, is there a code where I can add more than one page. I’ve managed to add 127 but how do I enter the others?post_type=’page’and ID <> 127 order by ID”);
<!– BEGIN MAIN-NAV.PHP –>
<!– To show “current” on the home page –>
<?php
$pages = $wpdb->get_results(“SELECT post_name, post_title, ID FROM $wpdb->posts WHERE post_type=’page’and ID <> 127 order by ID”);
$getTitle=trim(wp_title(‘ ‘, false));
$check=0;
foreach($pages as $page){ ?>
<?php
$getPageTitle=trim($page->post_title);
if($getTitle==$getPageTitle)
{$check=1;}
else
{$check=0;}
* ?> href=”<?php echo get_settings(‘home’).”/?page_id=”.($page->ID); ?>”><span class=”mLink”><?php echo $page->post_title; ?></span>
<span class=”m<?php echo $page->post_title; ?>”></span><?php } ?>
<!– END MAIN-NAV.PHP –>
-
https://en.forums.wordpress.com/topic/please-read-me-first-before-posting?replies=1
AND you are in the wrong forum.
And DO NOT POST THE SAME THING REPEATEDLY.
-
- The topic ‘Hiding pages from top nav’ is closed to new replies.