Text Link Ads

How to hide sub-pages from sidebar

Blogging Tips, Wordpress July 20th, 2007

    Visited 15804 times, 3 so far today

 If you have sub-pages on your sidebar that you want to hide then follow the simle easy steps below: 

  1. Login to your WordPress administration panel
  2. Select Presentation ->Theme Editor from the navigation menu
  3. On the Theme Editor page, you will see a list of “theme files” to the right of the page. Select the “sidebar” (sidebar.php).
  4. Find the following line
    wp_list_pages(‘title_li=’); ?> 
  5. Replace it with the following line
    <?php wp_list_pages(‘depth=1&title_li=<h2>Pages</h2>’ ); ?>

This should work and should display only Pages that are not children, in other words it should hide ALL the children Pages.

Read the Comments

[ # 69 ] Comment from Garry Conn [July 28, 2007, 7:01 am]

Ok.. this is very close to what I have been looking for, but not quite.

I have a main page and then I have sub pages and these sub pages have sub-sub pages, and these sub-sub pages actually have sub-sub-sub pages.

From the main page, I want to display only the sub pages…

and from the sub-pages, I only want to display their own sub-sub pages.

and from the sub-sub pages, I only wan tto display their own sub-sub-sub pages.

How do I do that?

MyAvatars 0.2

[ # 80 ] Comment from Farida [August 4, 2007, 12:20 pm]

Hi Garry, yes i know what you mean i’ve done the same for no1guide.co.nz. Im going to write a post for this very soon and will let you know once done.

MyAvatars 0.2

[ # 167 ] Comment from matthew feldman [August 27, 2007, 12:45 am]

I wanted to make the same change but to the header. I want only the main pages show in the header, not the subpages. I make the change but I got a fatel error

MyAvatars 0.2

[ # 12473 ] Comment from a [November 12, 2008, 11:36 am]

i got an error aswell…
this works for me:

MyAvatars 0.2
             



Resources

Categories

FREE Newsletter

Sign up TODAY and get FREE Tips every Week on Making Money on the Internet 

Recommended Book


      

Tag Cloud

Wordpress Blog Marketing Blogging Tips Blogging Tools and Services Advertising VoIP Blogging for Money Search Engine Optimization Adsense General

Recommended Money Makers


      Text Link Ads
      Blog Mastermind Affiliates
      AuctionAds
      Amazon Associates

Related Articles

Post-Plugin Library missing

Recent Articles