Adding own links to my header...

Discussion in 'PHP' started by TheDutchMan, Jun 19, 2008.

  1. #1
    Hi Folks,

    I was hoping one of you could help me out because i have the feeling I have tried everything but i can't seem to get it working.

    I have this header code and I want to add my own links right after the original pages, could you let me know what code to use.

     <!-- Navigation -->
    
    <div id="nav" class="box">
    
    <h3 class="noscreen">Navigation</h3>
    
    <ul>
    <li<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) ) { echo ' class="current_page_item"'; } ?>><a href="<?php echo get_option('home'); ?>">Home</a></li>
    
    
    <!-- Active page (highlighted) -->
    <?php wp_list_pages('title_li='); ?></ul>
    </div> <!-- /nav -->
    
    PHP:
    I thought it was this part, but I'm not a programmer or something close to that. If you need any more info please let me know.

    I hope to hear from you because I need my sleep;)
     
    TheDutchMan, Jun 19, 2008 IP
  2. MakeThatDollar

    MakeThatDollar Notable Member

    Messages:
    4,451
    Likes Received:
    158
    Best Answers:
    0
    Trophy Points:
    225
    #2
    Try this:

    
    <!-- Navigation -->
    
    <div id="nav" class="box">
    
    <h3 class="noscreen">Navigation</h3>
    
    <ul>
    <li<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) ) { echo ' class="current_page_item"'; } ?>><a href="<?php echo get_option('home'); ?>">Home</a></li>
    
    
    <!-- Active page (highlighted) -->
    <?php wp_list_pages('title_li='); ?>
    <li>Your Page Here</li></ul>
    </div> <!-- /nav -->
    
    PHP:
     
    MakeThatDollar, Jun 19, 2008 IP
    TheDutchMan likes this.
  3. TheDutchMan

    TheDutchMan Peon

    Messages:
    374
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I almost know for sure that i did that, but it seems that i didnt:)

    Thank you!! I appreciate you quick assistance.

    Rep is given
     
    TheDutchMan, Jun 20, 2008 IP
  4. TheDutchMan

    TheDutchMan Peon

    Messages:
    374
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    one more thing, the active page isn't highlighted when active; any suggestions??
     
    TheDutchMan, Jun 20, 2008 IP
  5. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Read wordpress documentation for the wp_list_pages function.
    There is a section for CSS
    Make your css file according to the CSS which is used in wp_list_pages function.

    URL : http://codex.wordpress.org/wp_list_pages
    I hope it helps

    Thanks
     
    nastynappy, Jun 20, 2008 IP
    TheDutchMan likes this.
  6. TheDutchMan

    TheDutchMan Peon

    Messages:
    374
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yes it did. I'm not completely there but I will be. Thanks
     
    TheDutchMan, Jun 20, 2008 IP