Hiding Wordpress pages

Discussion in 'WordPress' started by a!!!!1, Apr 24, 2008.

  1. #1
    I was wondering if there is a way to hide certain pages (pages, not posts) from displaying in the header, so the only way to access them would be through a direct link?

    Also, is there a way to do this with categories? As in, make it so certain categories don't show up in the category list in the sidebar? Thanks!
     
    a!!!!1, Apr 24, 2008 IP
  2. mizaks

    mizaks Well-Known Member

    Messages:
    2,066
    Likes Received:
    126
    Best Answers:
    0
    Trophy Points:
    135
    #2
    For posts:

    <?php wp_list_pages('exclude=17,38' ); ?>
    Code (markup):
    For categories:

    <?php wp_list_categories('exclude=4,7&title_li='); ?>
    Code (markup):
    Change the numbers after the exclude to the page/category ID you don't want links to.
     
    mizaks, Apr 24, 2008 IP
  3. a!!!!1

    a!!!!1 Peon

    Messages:
    346
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Where do I put that?
     
    a!!!!1, Apr 24, 2008 IP
  4. newman32

    newman32 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I put my code,

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=&exclude=1001'); ?>

    into header.php

    For some reason though, it does not work like it's supposed to and the page still shows up in the nav bar! Don't know what's wrong, but based on what everyone says the code is correct.
     
    newman32, Apr 24, 2008 IP
  5. godsofchaos

    godsofchaos Peon

    Messages:
    2,595
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Just use the plugin called Page Link Manager and you can do it with one click every single time you publish a page and also for the existing ones.
     
    godsofchaos, Apr 24, 2008 IP
    a!!!!1 likes this.
  6. a!!!!1

    a!!!!1 Peon

    Messages:
    346
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks, that's exactly what I needed. Is there one for categories?
     
    a!!!!1, Apr 24, 2008 IP
  7. godsofchaos

    godsofchaos Peon

    Messages:
    2,595
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I really never used anything for categories... But this plugin should help you. http://www.ryowebsite.com/?p=46

    also, there are plenty of javascript related plugins which shows dropdown categories.

    But if you are thinking of showing specific categories to specific people, then check out Wp Members Plugin.
    Cheerios!
     
    godsofchaos, Apr 26, 2008 IP