Choosing Which Pages To Appear In Navigation

Discussion in 'WordPress' started by Minterest, Dec 24, 2007.

  1. #1
    Hello,

    s it possible to select the pages manually to place in Page Navigation in WordPress?

    Check http://www.minterest.com/ I want to add more pages but dont want to appear in the Navigation as there is no space... Please help me....

    I knw that it can be done by selecting the new pages as a subpage of one of the main pages but I dont want to do like that... I want to add a page for e.g ADVERTISE so I want that page to appear in the main level.... Is it possible?
     
    Minterest, Dec 24, 2007 IP
  2. waynelyp90

    waynelyp90 Banned

    Messages:
    458
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add the link codes in the navigation bar by using HTML codes instead of PHP codes.
     
    waynelyp90, Dec 26, 2007 IP
  3. Minterest

    Minterest Well-Known Member

    Messages:
    2,694
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    180
    #3
    Thanks for the reply... How do I do that? Am using WordPress
     
    Minterest, Dec 26, 2007 IP
  4. r3born

    r3born Active Member

    Messages:
    1,070
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    88
    #4
    Go to the theme editor and edit the corresponding file (header or sidebar).
    It's quite easy, just check what's the format (styles, lists) and replace PHP by HTML.

     
    r3born, Dec 26, 2007 IP
  5. Minterest

    Minterest Well-Known Member

    Messages:
    2,694
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    180
    #5
    I guess we need to change the highlighted part right? Its the part just below the BODY tag in header.php

    <!-- start header -->

    <div class="Header"><div class="LS"></div>
    <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    <p class="Desc"><?php bloginfo('description'); ?></p>
    </div>

    <div class="Menu">
    <div class="MTL"></div><div class="MTR"></div>
    <ul>
    <li><a class="<? echo (is_home())?'on':''; ?>" href="<?php echo get_option('home'); ?>/"><span>Home</span></a></li>
    <?php
    $pages = wp_list_pages('sort_column=menu_order&title_li=&echo=0');
    $pages = preg_replace('%<a ([^>]+)>%U','<a $1><span>', $pages);
    $pages = str_replace('</a>','</span></a>', $pages);
    echo $pages;
    ?>
    </ul>
    </div>
     
    Minterest, Dec 26, 2007 IP
  6. Minterest

    Minterest Well-Known Member

    Messages:
    2,694
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    180
    #6
    Can I add some codes so that it list specific posts only?
     
    Minterest, Dec 26, 2007 IP
  7. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #7
    That seems like an awful complicated way...if you don't want pages in your menu, can't you can just edit them, and check the "Draft", or "Private" box on the left side of the edit page, instead of "Publish"?
     
    hmansfield, Dec 26, 2007 IP
  8. r3born

    r3born Active Member

    Messages:
    1,070
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    88
    #8
    Here's what you can do, just replace the elements in green:

    <div class="Menu">
    <div class="MTL"></div><div class="MTR"></div>
    <ul>
    <li>
    <a class="<? echo (is_home())?'on':''; ?>" href="<?php echo get_option('home'); ?>/"><span>Home</span></a></li>
    <li><a class="page_item" title="Page Title 1" href="http://www.minterest.com/desired-page-1">Page 1 Name</a></li>
    <li><a class="page_item" title="Page Title 2" href="http://www.minterest.com/desired-page-2">Page 2 Name</a></li>
    <li><a class="page_item" title="Page Title 3" href="http://www.minterest.com/desired-page-3">Page 3 Name</a></li>
    </ul>
    </div>


     
    r3born, Dec 26, 2007 IP
    Minterest likes this.
  9. Minterest

    Minterest Well-Known Member

    Messages:
    2,694
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    180
    #9
    Thanks for that... I will check it out and will update here......

     
    Minterest, Dec 27, 2007 IP
  10. Minterest

    Minterest Well-Known Member

    Messages:
    2,694
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    180
    #10
    Hello,

    I have tried this today but its not working... yes i can manually add pages like this.. but the Mouseover is not working... it must change the style when we go to the new page...

     
    Minterest, Feb 14, 2008 IP
  11. Minterest

    Minterest Well-Known Member

    Messages:
    2,694
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    180
    #11
    I have Googled for a solution... and have discovered that...... All you need to do is to install a plugin called Exclude Pages..... http://wordpress.org/extend/plugins/exclude-pages/

    This plugin adds a checkbox, “include this page in menus”, which is checked by default. If you uncheck it, the page will not appear in any listings of pages (which includes, and is usually limited to, your page navigation menus).
    Pages which are children of excluded pages also do not show up in menu listings. (An alert in the editing screen, underneath the "include" checkbox allows you to track down which ancestor page is affecting child pages in this way.)
     
    Minterest, Feb 14, 2008 IP
  12. TheDutchMan

    TheDutchMan Peon

    Messages:
    374
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I did the same for several of my blogs and just altered this in the header

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

    into the page numbers that i wanted, works like a charm.
    <?php wp_list_pages('include= 87,88, 70, 72&depth=1&title_li='); ?>
     
    TheDutchMan, Feb 15, 2008 IP