Jul 10 2012

How to Remove Hard-Coded Home Tab (I had 2 HOME tabs after static page started)

After creating a static page called “Home,” I ended up with 2 tabs with the same name because one is hard coded into the header.php file.  Each theme may be slightly different, but for mine I went to APPEARANCE, then EDITOR while logged into WordPress as Admin.

On the right side I clicked header.php and scrolled until I found some code that I could comment out then test it.  For my theme (currently Elegant Grunge) it looked like this:

<ul>
<li><a href=”<?php bloginfo(‘url’); ?>”><?php _e(‘Home’, ‘elegant-grunge’) ?></a></li>
<?php wp_list_pages(‘title_li=&depth=1’); ?>
</ul>

So I remarked  some of the code so it would not be read. This is done with <!– before the start of the code and –> at the end. Now mine looks like this:

<ul>
<!–        <li><a href=”<?php bloginfo(‘url’); ?>”><?php _e(‘Home’, ‘elegant-grunge’) ?></a></li>
–>
<?php wp_list_pages(‘title_li=&depth=1’); ?>
</ul>

One last problem after I corrected this was my tabs were not in the order I wanted. You have to go back into PAGES and click EDIT under your page you want to be first.  Over on the right side is an ORDER box with a number.  This is the order you want the page to appear in the tabs, starting with zero showing first.  I put 0 in my page I want first then 1 in the next pages ORDER box and so on.