• Resolved fleemail

    (@fleemail)


    Hi: I am having trouble deleting the original “home” link from my site when I change my homepage to a static page. My site is here http://www.flee-mail.com Does anyone have any idea where I should fix this. I tried messing with the header file code but I couldnt fix anything.

Viewing 10 replies - 1 through 10 (of 10 total)
  • thelastknight

    (@thelastknight)

    Is your menu hard coded or is it generated with a WordPress function?

    Post the code for the menu. 🙂

    John H

    (@wpbloghost)

    Looks like you have 2 Pages named Home. Log into WordPress and head over to your “Pages” area. Look to see if there’s one named “Home”. Don’t delete it, just rename it and see if one of the Home links change to the new name.

    If so, then you probably don’t need it and can delete that page. Just make sure that’s the one you can delete before you go deleting it, though.

    Rename it to, say, “Temp”. If the second Home menu link changes to say “Temp”, then you can delete it.

    Thread Starter fleemail

    (@fleemail)

    WpBlogHost when I do that it defaults my home page back to the blog because there is no static page to link to

    Thread Starter fleemail

    (@fleemail)

    the last knight here is my code from my header.php file

    <!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 if ( is_home() ) { ?><?php bloginfo('description'); ?> | <?php bloginfo('name'); ?><?php } ?>
    		<?php if ( is_search() ) { ?><?php echo $s; ?> | <?php bloginfo('name'); ?><?php } ?>
    		<?php if ( is_single() ) { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?>
    		<?php if ( is_page() ) { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?>
    		<?php if ( is_category() ) { ?><?php _e('Archive', 'elegant-grunge') ?> <?php single_cat_title(); ?> | <?php bloginfo('name'); ?><?php } ?>
    		<?php if ( is_month() ) { ?><?php _e('Archive', 'elegant-grunge') ?> <?php the_time('F'); ?> | <?php bloginfo('name'); ?><?php } ?>
    		<?php if ( is_tag() ) { ?><?php single_tag_title();?> | <?php bloginfo('name'); ?><?php } ?>
    </title>
    
    <?php elegant_grunge_the_favicon() ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <?php if ( get_option('header_image') ) : ?>
    <style type="text/css">
    #header div {
    	background: url(<?php echo get_option('header_image') ?>) no-repeat center top;
    	width: 100%;
    	height: 100%;
    	display: block;
    }
    #header * {
    	display: none;
    }
    </style>
    <?php endif; ?>
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" />
    <style type="text/css">
    #footer #subscribe a {
    	background:none;
    	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php bloginfo('template_url')?>/images/rss.png');
    }
    <?php if ( get_option('header_image') ) : ?>
    #header div {
    	background: none;
    	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo get_option('header_image')?>');
    }
    <?php endif; ?>
    </style>
    <![endif]-->
    
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    <?php echo get_option("extra_header") ?>
    
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    
    <?php wp_head(); ?>
    
    </head>
    
    <?php
    if ( !defined('EG_BODY_CLASS') && get_option('page_setup') != 'right-sidebar' )
    	define('EG_BODY_CLASS', get_option('page_setup'));
    ?>
    
    <body <?php if ( defined('EG_BODY_CLASS') ) echo 'class="'.EG_BODY_CLASS.'"'; ?>>
    
    <div id="page">
    
    <div id="menu">
    	<ul>
    		<li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>"><?php _e('Home', 'elegant-grunge') ?></a></li>
    		<?php wp_list_pages('title_li=&depth=1'); ?>
    	</ul>
    	<div class="clear"></div>
    </div>
    
    <div id="header-wrap">
    <div id="header">
    	<div>
    		<h1><a href="<?php bloginfo('home') ?>"><?php bloginfo('name'); ?></a></h1>
    		<span id="blog-description"><?php bloginfo('description'); ?></span>
    	</div>
    </div>
    </div>
    
    <!-- end header -->

    Thread Starter fleemail

    (@fleemail)

    Oh and the menu is generated with a wordpress function

    Thread Starter fleemail

    (@fleemail)

    Any help? Here is my site again http://www.flee-mail.com

    esmi

    (@esmi)

    You could try replacing:

    <div id="menu">
    	<ul>
    		<li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>"><?php _e('Home', 'elegant-grunge') ?></a></li>
    		<?php wp_list_pages('title_li=&depth=1'); ?>
    	</ul>
    </div>

    with:

    <?php wp_page_menu('depth=1'); ?>

    But you’ll need to go through your stylesheet changing every reference from #menu to .menu.

    If that doesn’t appeal, make a note of the id for the page you’re currently using as your Home page, then amend:

    <?php wp_list_pages('title_li=&depth=1'); ?>

    to

    <?php wp_list_pages('title_li=&depth=1&exclude=X'); ?>

    where X = your home page id.

    Thread Starter fleemail

    (@fleemail)

    Where would I change the home page id? to make the second option work?

    Thanks for this help by the way

    esmi

    (@esmi)

    You don’t change it. You find what id WP has already assigned to it.

    Log into Admin. Navigate to Pages. Place your mouse over the title of your Home page in the Edit Pages list. A url will appear in the status bar of your browser that ends with &post= followed by a number. That number is the page id for your Home page.

    Thread Starter fleemail

    (@fleemail)

    Thanks man, this worked perfectly.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Issue with Static Homepage’ is closed to new replies.