Site is adding every new page to the navigation bar!?

Discussion in 'HTML & Website Design' started by TeDWooD, Dec 10, 2010.

  1. #1
    Okay so the title basically explains it. Every time i add a new page to my wordpress site it just adds to the navigation bar. Im not sure if it's css or the php files thats making it do this.
    Hopefully in the image you can see what i mean. All i want is for certain pages to be in the sidebar and have a basic navigation bar such as home, about, contact etc.
    What can i do to correct this?
     

    Attached Files:

    TeDWooD, Dec 10, 2010 IP
  2. mywarezhost

    mywarezhost Greenhorn

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    it wont be in css. Most likely php. Look at the php file that handles the navigation bar.
     
    mywarezhost, Dec 10, 2010 IP
  3. PaulSch

    PaulSch Active Member

    Messages:
    781
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    85
    #3
    What theme are you using?
     
    PaulSch, Dec 10, 2010 IP
  4. mywarezhost

    mywarezhost Greenhorn

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    Themes wont make a difference. If im correct wordpress themes are just css files + Images.
     
    mywarezhost, Dec 10, 2010 IP
  5. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #5
    Not true. Open your themes index.php or single.php ... you see php code.

    The problem can be easily fixed. Every site has an ID. You just need to add it to the wp_list_pages exclude function.

    Read here -> http://codex.wordpress.org/Function_Reference/wp_list_pages#Exclude_Pages_from_List

    Therefore you need to edit your theme files (just search for wp_list_pages in your php files).

    Example:

    
    <?php wp_list_pages('exclude=17,38' ); ?>
    
    Code (markup):
    The sites with the ID 17 and 38 are not shown in the pages list.
     
    CSM, Dec 10, 2010 IP
  6. mywarezhost

    mywarezhost Greenhorn

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #6
    mywarezhost, Dec 10, 2010 IP
  7. WebPageMistakes

    WebPageMistakes Well-Known Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    110
    #7
    Pages - Codex at Wordpress.org
     
    WebPageMistakes, Dec 10, 2010 IP
  8. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #8
    In WP a lot is controlled with the php functions.
     
    CSM, Dec 10, 2010 IP
  9. TeDWooD

    TeDWooD Member

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #9
    Thanks for all the great info guys, will let you know how i get on.
     
    TeDWooD, Dec 10, 2010 IP
  10. TeDWooD

    TeDWooD Member

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #10
    Hey guys, didn't manage to change my code but did find a great plugin which enables me to hide/show posts. It's called pageMash :)
     
    TeDWooD, Dec 10, 2010 IP
  11. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #11
    Pages and Posts are different.
     
    radiant_luv, Dec 10, 2010 IP
  12. WebPageMistakes

    WebPageMistakes Well-Known Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    110
    #12
    Did you follow the link to the wp list pages information?

    If so, what part did you not get right?
     
    WebPageMistakes, Dec 10, 2010 IP
  13. TeDWooD

    TeDWooD Member

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #13
    Oh yea sorry my pages. I also made a parent in the sidebar so they all fit in one.
    Hey i knew that i had to put the code in but i didn't know exactly where, i did find a code with wp_list_pages in the function.php files but it was totally irrelevant. In the end it just ended up with me messing with my code and nearly ruining the site.
     
    TeDWooD, Dec 11, 2010 IP
  14. Just A Wag

    Just A Wag Peon

    Messages:
    459
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I've always thought the way wordpress handles what pages appear where in navigation is really crap - it can be a real battle to get things how you want them. E107 on the other hand is a joy - everything works as you would want and can be set how you like it from the back-end without hacking the code. Having used both extensively I can tell you that e107 makes wordpress look awkward and tired in a lot of respects.
     
    Just A Wag, Dec 11, 2010 IP
  15. WebPageMistakes

    WebPageMistakes Well-Known Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    110
    #15
    That is because you don't mess with the functions.php when you want to do this. You find the wp_list_pages in your theme files and set the paramenters in that.;)
     
    WebPageMistakes, Dec 11, 2010 IP