WordPress.org

Ready to get started?Download WordPress

Forums

2 Home buttons on Home page (3 posts)

  1. sisterlycharms
    Member
    Posted 6 years ago #

    Help! This is my first blog and I have 2 home buttons on my front home page. I know that one home button is hard linked into my theme but I can't figure out which piece of the code I need to get rid of to make 1 of the home buttons disappear. This is the code that is in my header.php which is where I think the code would be.

    <div id="navbox">

    <div id="nav">
    <ul class="nav">
    <li class="<?php if ( is_home() ) { ?>current_page_item<?php } else { ?>page_item<?php } ?>">"><?php _e('home'); ?>
    <?php wp_list_pages('title_li='); ?>

    </div> <!-- end nav -->

    Please help!!

  2. Anonymous
    Unregistered
    Posted 6 years ago #

    I found the fix! The trick (if you want to call it that) is to comment out the home page link. I had the same problem I thought it would be way harder. I hope it works on your code too, as mine is a tad bit different.

    <div id="nav">
    <ul class="nav">
    <li class="first">
    <!--
    ">Home-->
    <?php wp_list_pages('title_li='); ?>

    </div>

  3. Anonymous
    Unregistered
    Posted 6 years ago #

    Sorry about that, needed to be encoded

    <div id="nav">
    <ul class="nav">
    <li class="first">
    <!--
    <a href="<?php bloginfo('url'); ?>">Home</a>
    -->
    </li>
    <?php wp_list_pages('title_li='); ?>
    </ul>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic