Title: Remove Home Button from Navigation Bar &#8211; header.php code
Last modified: August 19, 2016

---

# Remove Home Button from Navigation Bar – header.php code

 *  Resolved [cstina](https://wordpress.org/support/users/cstina/)
 * (@cstina)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/)
 * After I upgraded to 3.0, I imported all data from an ‘old’ blog, to my ‘new’ 
   current blog.
 * When I did that, the “Home” button reappeared on my ‘new’ blog. On my ‘old’ blog,
   it wasn’t there.
 * I suppose some data from my header.php didn’t get exported correctly.
 * Anyhow..
 * How do I remove the “Home” button from my blog? I can’t remember how I did it
   =/
 * Here’s my header.php code:
 * [http://pastie.org/1053254](http://pastie.org/1053254)
 * Thanks

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

 *  [Chinmoy](https://wordpress.org/support/users/chinmoy/)
 * (@chinmoy)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592516)
 *     ```
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
   
       <head profile="http://gmpg.org/xfn/11">
       <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
   
       <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' |'; } ?> <?php bloginfo('name'); ?></title>
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/screen.css" type="text/css" media="screen, projection" />
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/print.css" type="text/css" media="print" />
       <!--[if IE]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie.css" type="text/css" media="screen, projection"><![endif]-->
       <!--[if IE 6]>
       	<script src="<?php bloginfo('template_url'); ?>/js/pngfix.js"></script>
       <![endif]-->
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
       <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
       <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
       <?php if(get_theme_option('favicon') != '') { ?>
       <link rel="shortcut icon" href="<?php echo get_theme_option('favicon'); ?>" type="image/x-icon" />
       <?php } ?>
   
       <?php wp_head(); ?>
       <?php echo get_theme_option("head") . "\n"; ?>
       </head>
       <body>
       	<div id="wrapper">
       		<div id="container" class="container">
                   <?php $sidebar_over_header = get_theme_option('sidebar_over_header') == 'true' ? true : false; ?>
   
       			<div class="<?php if($sidebar_over_header) { echo 'span-16';} else { echo 'span-24';} ?>">
                       <div id="header">
                           <?php
       					$get_logo_image = get_theme_option('logo');
       					if($get_logo_image != '') {
       						?>
       						<a href="<?php bloginfo('url'); ?>"><img src="<?php echo $get_logo_image; ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>" class="logo" /></a>
       						<?php
       					} else {
       						?>
       						<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
       						<h2><?php bloginfo('description'); ?></h2>
       						<?php
       					}
       					?>
       				</div>
   
                       <div class="navcontainer">
       					<ul id="nav">
   
       						<?php wp_list_pages('depth=1&number=6&sort_column=menu_order&title_li=' ); ?>
       					</ul>
       				</div>
                   <?php if(!$sidebar_over_header) { ?></div><div class="span-16"><?php } ?>
       ```
   
 * Replace with this code.
 *  Thread Starter [cstina](https://wordpress.org/support/users/cstina/)
 * (@cstina)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592527)
 * Can I please ask.. what line of code you changed?
 * Thanks.
 *  [Chinmoy](https://wordpress.org/support/users/chinmoy/)
 * (@chinmoy)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592528)
 *     ```
       <ul id="nav">
       						<li <?php if(is_home()) { ?> class="current_page_item" <?php } ?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>
       						<?php wp_list_pages('depth=1&number=6&sort_column=menu_order&title_li=' ); ?>
       					</ul>
       ```
   
 * Above code I removed following code:
 * `<li <?php if(is_home()) { ?> class="current_page_item" <?php } ?>><a href="<?
   php echo get_option('home'); ?>/">Home</a></li>`
 *  Thread Starter [cstina](https://wordpress.org/support/users/cstina/)
 * (@cstina)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592530)
 * Thanks again chinmoy. Worked like a charm!
 *  [Patricia](https://wordpress.org/support/users/tapricia/)
 * (@tapricia)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592761)
 * excuse me, but which document did you revise?
    where do i find that document?
   in appearance > editor ? or in the docs on the server? thank you!
 *  [Patricia](https://wordpress.org/support/users/tapricia/)
 * (@tapricia)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592762)
 * p.s. i think one of these groups is the code that is responsible for my double‘
   Home’ in the navigation bar…
 * —
 * <?php
    // Produces links for every page just below the header function veryplaintxt_globalnav(){
   echo “<div id=\”globalnav\”><ul id=\”menu\”>”; if ( !is_front_page() ) { ?><li
   class=”page_item_home home-link”>/” title=”<?php echo wp_specialchars(get_bloginfo(‘
   name’), 1) ?>” rel=”home”><?php _e(‘Home’, ‘veryplaintxt’) ?><?php } $menu = 
   wp_list_pages(‘title_li=&sort_column=menu_order&echo=0’); // Params for the page
   list in header.php echo str_replace(array(“\r”, “\n”, “\t”), ”, $menu); echo “
   </div>\n”; }
 * —
 * or
 * —
    function widget_veryplaintxt_homelink($args) { extract($args); $options = 
   get_option(‘widget_veryplaintxt_homelink’); $title = empty($options[‘title’])?
   __( ‘Home’, ‘veryplaintxt’ ) : $options[‘title’]; if ( !is_front_page() || is_paged()){?
   > <?php echo $before_widget; ?> <?php echo $before_title; ?>/” title=”<?php echo
   wp_specialchars(get_bloginfo(‘name’), 1) ?>” rel=”home”><?php echo $title; ?>
   <?php echo $after_title; ?> <?php echo $after_widget; ?> <?php } }
 *  [Patricia](https://wordpress.org/support/users/tapricia/)
 * (@tapricia)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592763)
 * more information…
 * [http://www.authorsupportcoop.com](http://www.authorsupportcoop.com) . macintosh.
   safari
 * i get two ‘home’ tabs on the navigation bar. if you go to any page on the navigation
   bar other than ‘at your service’ (which is the ‘Home’ page), then ‘Home’ shows
   up even tho there is no ‘home’… i renamed ‘home’ below to ‘at your service’ and
   then i had two ‘at your service’ tabs. i am using the veryplaintxt theme and 
   i believe this is where the problem lies but i only speak very simply html and
   i don’t want to damage anything.
 * —
 * Theme Functions (functions.php)
 * <?php
    // Produces links for every page just below the header function veryplaintxt_globalnav(){
   echo “<div id=\”globalnav\”><ul id=\”menu\”>”; if ( !is_front_page() ) { ?><li
   class=”page_item_home home-link”>/” title=”<?php echo wp_specialchars(get_bloginfo(‘
   name’), 1) ?>” rel=”home”><?php _e(‘Home’, ‘veryplaintxt’) ?><?php } $menu = 
   wp_list_pages(‘title_li=&sort_column=menu_order&echo=0’); // Params for the page
   list in header.php echo str_replace(array(“\r”, “\n”, “\t”), ”, $menu); echo “
   </div>\n”; }

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

The topic ‘Remove Home Button from Navigation Bar – header.php code’ is closed to
new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [Patricia](https://wordpress.org/support/users/tapricia/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/remove-home-button-from-navigation-bar-headerphp-code/#post-1592763)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
