War Room

Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design

Featured Warrior Special Offer...
"Members Of The *War Room* Discover Secrets To Immediate Success!"
Reply
 
LinkBack Thread Tools
Old 10-17-2009, 07:15 AM   #1
HyperActive Warrior
War Room Member
 
samuelbell's Avatar
 
Join Date: May 2009
Posts: 148
Thanks: 78
Thanked 24 Times in 4 Posts
Default Having problems Hinding wordpress pages

Hello Guys,

I am having a few problems, I am trying to figure out how to hide wordpress pages on a free theme I have found. Here is some of the code from the header.php



PHP Code:
</div><!-- Closes underHeader -->



<div id="nav">
<?php function get_the_pa_ges() {
  global 
$wpdb;
  if ( ! 
$these_pages wp_cache_get('these_pages''pages') ) {
     
$these_pages $wpdb->get_results('select ID, post_title from '$wpdb->posts .' where post_status = "publish" and post_type = "page" order by ID');

   }
  return 
$these_pages;
 }

 
function 
list_all_pages(){

$all_pages get_the_pa_ges ();
foreach (
$all_pages as $thats_all){
$the_page_id $thats_all->ID;

if (
is_page($the_page_id)) {
  
$addclass ' class="current_page"';
  } else {
  
$addclass '';
  }
$output .= '<li' $addclass '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>';
}
Any Ideas ?

Any help at all is appreciated.

samuelbell is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-17-2009, 01:04 PM   #2
Advanced Warrior
War Room Member
 
SusanneUK's Avatar
 
Join Date: May 2008
Location: Swansea, South Wales, UK
Posts: 798
Thanks: 391
Thanked 137 Times in 93 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to SusanneUK
Default Re: Having problems Hinding wordpress pages

Try adding the plugin to "exclude pages from menus" you tick a box if you want the page to show in any user menues, so if you want to hide a page, create it, and untick the box.

Search for it in your "Add New" plugins area.

Cheers
Sue

EDIT - This is the name of the plugin "Exclude Pages from Navigation"

SALE---> Wordpress Christmas Theme Package Sale, 5 Themes for just $7 <---SALE
Featured Content Gallery Integration, 5 Designs to choose from!

One-to-One Wordpress Coaching Service Available at Low Hourly Rate - Let the frustration end now! Wordpress Installs, Theme Design, Site Tweaks & other services available - 20% discount for Warriors!
SusanneUK is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-18-2009, 05:50 AM   #3
Warrior Member
 
Join Date: Oct 2009
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: Having problems Hinding wordpress pages

I haven't seen such a complicated code,usually list_pages function is failry enough...

To hide pages in the navbar you should paste your header.php in Notepad++ or other editor and find the matching closing php tag for
Code:
 <?php function get_the_pa_ges() {
It should look like this
Code:
?>
When you find it delete the whole function and that's it.
I hope this helps
LoraGi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-18-2009, 07:35 AM   #4
Vetwriter
War Room Member
 
Audrey Harvey's Avatar
 
Join Date: Dec 2005
Location: Australia.
Posts: 447
Thanks: 29
Thanked 31 Times in 30 Posts
Social Networking View Member's FaceBook Profile 
Default Re: Having problems Hinding wordpress pages

Susanne is on the ball, I use that plugin too, it's very simple to use.

Here's the link WordPress › Exclude Pages WordPress Plugins

Audrey Harvey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design

Tags
hinding, pages, problems, wordpress

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 10:50 AM.