• Resolved cstina

    (@cstina)


    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:

    https://pastie.org/1053254

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="https://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

    (@cstina)

    Can I please ask.. what line of code you changed?

    Thanks.

    <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

    (@cstina)

    Thanks again chinmoy. Worked like a charm!

    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!

    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 }
    }

    more information…

    https://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.