Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design
Register Blogs FAQ Social Groups CalendarHelp Desk

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: 166
Blog Entries: 1
Thanks: 85
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   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: 981
Thanks: 512
Thanked 182 Times in 123 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"

One-to-One WordPress Coaching Service Available at Low Hourly Rate - Let the frustration end now! WordPress Installs, Theme Design, Site Tweaks & other WordPress services available
SusanneUK is offline   Reply With Quote
Old 10-18-2009, 05:50 AM   #3
Warrior Member
 
Join Date: Oct 2009
Posts: 10
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   Reply With Quote
Old 10-18-2009, 07:35 AM   #4
www.vetwriter.com
War Room Member
 
Audrey Harvey's Avatar
 
Join Date: Dec 2005
Location: Brisbane, Australia.
Posts: 1,180
Thanks: 107
Thanked 315 Times in 236 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 online now   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 07:56 AM.