WordPress.org

Ready to get started?Download WordPress

Forums

Adding a non-Page item to a header (4 posts)

  1. scpetrel
    Member
    Posted 8 years ago #

    I'm tweaking the Andreas09 theme for my web site -- http://www.heatherandchopper.com -- and have been very happy with the results. One thing has stumped me though. I am integrating Gallery into my WP site and want to add a Gallery link to my header. I've currently got this code in my header.php file:

    <div id="navigation">

      <li class="selected">>Home
      <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>

    </div>

    So, what I want to do is add another item called "Gallery" to that with the same formatting as the Page items. I can add it as a line item to the existing list but I don't get the same formatting. So, I'm assuming this is a CSS issue, which is totally new to me. Any advice?

    Thanks!
    Heather

  2. ladydelaluna
    Member
    Posted 8 years ago #

    Try this:

    <div id="mainmenu">
    <ul>
    <li class="<?php echo $home_highlight; ?>"><a href="<?php echo get_settings('home'); ?>">Home</a></li>
    <?php wp_list_pages('depth=1&title_li=' ); ?>
    <li class="<?php echo $blog_highlight; ?>"><a href="http://www.linktoyourgallerypage.com">Gallery</a></li>
    </ul>
    </div>

    (This is from a site using that same theme, btw) :)

  3. ginoxy
    Member
    Posted 8 years ago #

    Hi, i have the "pool" theme and i can add pages that appear into my header page with Icons and thats good for me.
    now i want to add another icon like "archives" and i want to put all my archives and the coming archives into that icon is there any idea to do that ?

    Thanks.

  4. scpetrel
    Member
    Posted 8 years ago #

    ladydelaluna, thank you!!! I modified what you provided somewhat:

    <div id="navigation">
    <ul>
    <li class="selected"><a href=<?php echo get_settings('home'); ?>>Home</a></li>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    <li class="<?php echo $blog_highlight; ?>"><a href="http://www.heatherandchopper.com/wp-gallery2.php">Photo Gallery</a></li>
    </ul>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.