WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Two 'Home' Links in main menu (8 posts)

  1. transformer617
    Member
    Posted 4 years ago #

    Hi,
    I got this fixed by asking here before but a search hasn't turned up the answer! I made a static front page and have an additional 4 static pages and then my blog page and a contact page. Everything's good. Except there are now two 'Home' links in my main menu. I got rid of one of those before by editing something in the following code but don't remember the change I made. Can anyone help? I upgraded without doing a site backup and lost style sheets and other modifications! Won't do THAT again.

    The site is at http://hatsandscarves.org. The template is Simplex.
    <div id="pagemenu">
    <ul id="page-list" class="clearfix"><li <?php if(is_home()){ echo 'class="page_item current_page_item"'; } else { echo 'class="page_item"'; } ?>>" title="Home" >Home<?php wp_list_pages('title_li='); ?>
    </div>`

    TIA
    Bill

  2. vtxyzzy
    Member
    Posted 4 years ago #

    Maybe this is what you want:
    <?php wp_list_pages('title_li=&exclude=123'); ?>
    where 123 is replaced with the ID of your home page.

  3. transformer617
    Member
    Posted 4 years ago #

    Wow! I hate to be a lunkhead but where do I find the page id?

  4. transformer617
    Member
    Posted 4 years ago #

    Oops! Never mind. I figured it out (preview page in Dashboard, read id in browser.-- for others, too.)

    But -- sorry to say -- your solution didn't seem to work. Any other ideas?
    Bill

  5. sathishn
    Member
    Posted 4 years ago #

    you may just try this

    `<div id="pagemenu">
    <?php wp_list_pages(); ?>
    </div>

  6. sathishn
    Member
    Posted 4 years ago #

    you may just try this

    <div id="pagemenu">
    <?php wp_list_pages(); ?>
    </div>
  7. transformer617
    Member
    Posted 4 years ago #

    sathishn (and others)
    Neither of those solutions worked on this page. But I did fix it, and I'm not certain how. But this is what I think was going on.

    I had just upgraded to wp 2.9 and it has some new features! One of those, under the Settings menu, is Page-List-Plus. One of the options in there is "Add 'Home' link at the start of Page Lists"; it is checked by default! When I finally found that that setting existed, I unchecked the box, cleared my cache and my problem was gone.

    Maybe there's something in the documentation of the 2.9 new features, but I just went ahead and did an automatic upgrade from the Dashboard; had I downloaded for manual install, I might have been more careful :(

    Thank you all for your help; hope I didn't waste your time.
    Bill

  8. vtxyzzy
    Member
    Posted 4 years ago #

    Thanks for the tip. Glad you found it! Please mark this topic Resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic