WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Two home-page tabs in header bar (6 posts)

  1. groundrootsmaintenance
    Member
    Posted 2 years ago #

    Hi,

    I'm using the shell-lite theme, it has a static front page.

    I've recently created a blog on a separate page following instructions found on here. Everything thing appears to be working except that on my front page I now have two home tabs.

    I've done a search to find out how remove the one I do not require and this resulted in searching in 'header.php' for the 'wp_list_pages' code.

    I found the code and have tried to change it to remove the home tab I no longer require.

    Unfortunately, being slightly new to this, nothing seems to be working.

    so, how do I change the following code to remove the first home tab?

    php } else { ?>
    
                    <ul class="menu">
                        <li><a href="<?php echo home_url(); ?>/">Home</a></li>
                        <?php wp_list_pages('title_li='); ?>
                    </ul><!-- end of .menu -->
    
    				<?php } ?>

    My site is http://www.groundrootsmaintenance.com

    Many thanks.

  2. Sage Brownell
    Member
    Posted 2 years ago #

  3. Marventus
    Member
    Posted 2 years ago #

    Hi there,

    Since your home is a static page, wp_list_pages already lists the Home page as an item, so simply delete this line:

    <li><a href="<?php echo home_url(); ?>/">Home</a></li>

    Cheers!

  4. groundrootsmaintenance
    Member
    Posted 2 years ago #

    Many many thanks both of you - that worked a treat.

  5. Marventus
    Member
    Posted 2 years ago #

    Hi,

    Good to know it worked.
    Please don't forget to mark this thread as resolved.

    Thanks!

  6. Marventus
    Member
    Posted 2 years ago #

    Hi,

    Could you please mark your topic as resolved? It is important for users to do this so other people that encounter the same problems can know what to do.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic