Support » Fixing WordPress » Two ‘Home’ Links in main menu

  • Resolved transformer617

    (@transformer617)


    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

Viewing 7 replies - 1 through 7 (of 7 total)
  • vtxyzzy

    (@vtxyzzy)

    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.

    transformer617

    (@transformer617)

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

    transformer617

    (@transformer617)

    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

    you may just try this

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

    you may just try this

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

    (@transformer617)

    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

    vtxyzzy

    (@vtxyzzy)

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Two ‘Home’ Links in main menu’ is closed to new replies.