How to remove 2 home pages from your wordpress blog

by webgarden ~ March 31st, 2008. Filed under: Techy Stuff, php.

Some wordpress themes and not very good a supporting “static” pages. After  you have altered your wordpress blog into a static site, you may end up with 2 home links in your menu bar . To remove one of the two home pages go into your theme folder and find header.php. Locate the following code: (near the bottom)

 <div id=”menu”>
 <ul>
   <li class=”<?php if (is_home()) { ?>current_page_item<?php } else { ?>page_item<?php } ?>”> <a href=”<?php bloginfo(’url’); ?>” title=”Home”>Home</a></li>
  <?php wp_list_pages(’title_li=&depth=1′); ?>
 </ul>
</div>

comment out this part:

<a href=”<?php bloginfo(’url’); ?>” title=”Home”>Home</a>

Upload header.php and refresh your page to review the changes.

 ALWAYS comment out the code – DO NOT DELETE – you never know when/ if you may need it again.

I hope this is helpful for some of you!

Leave a Reply