WordPress.org

Ready to get started?Download WordPress

Forums

PLEASE HELP - which part of the code do i delete (4 posts)

  1. luv4music
    Member
    Posted 4 years ago #

    my site has two home page tabs, I have read that there is a bit of the header.php code that I must delete but i dnt know which part, can someone please help. Thanks

    <!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">
    <head profile="http://gmpg.org/xfn/11">

    <title>
    <?php if ( is_home() ) { ?><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?><?php } ?>
    <?php if ( is_search() ) { ?><?php bloginfo('name'); ?> | Search Results<?php } ?>
    <?php if ( is_author() ) { ?><?php bloginfo('name'); ?> | Author Archives<?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() ) { ?>Archive | <?php single_cat_title(); ?> | <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_month() ) { ?>Archive | <?php the_time('F'); ?> | <?php bloginfo('name'); ?><?php } ?>
    <?php if (function_exists('is_tag')) { if ( is_tag() ) { ?><?php bloginfo('name'); ?> | Tag Archive | <?php single_tag_title("", true); } } ?>
    </title>
    <?php if(!$temp=get_option('swift_favicon'))$temp=get_bloginfo('template_url').'/images/favicon.ico';?>
    <link rel="shortcut icon" href="<?php echo $temp;?>" />

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
    <link rel="stylesheet" type="text/css" href="<?php echo U_URL.'/swift_custom';?>/custom-style.css" media="screen" />

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if ( get_option('woo_feedburner_url') <> "" ) { echo get_option('woo_feedburner_url'); } else { echo get_bloginfo_rss('rss2_url'); } ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-ui-core');
    wp_enqueue_script('jquery-ui-tabs');
    ?>
    <?php if ( is_single() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>
    <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url')?>/includes/js-functions.js"></script>

    <?php if ($header_scripts=get_option('swift_header_scripts')) { echo stripslashes($header_scripts);}?>
    </head>
    <body>

    <?php navigation(get_option('swift_nav1'),1);?>

    <div id="header-container">
    <div id="header" class="grid_960 clearfix">
    <div class="grid_16">

    <?php if(get_option('swift_logo')): ?>
    <div id="logo" class="alignleft">
    " title="<?php bloginfo('description'); ?>">
    <img src="<?php echo get_option('swift_logo')?>" alt="<?php bloginfo('name'); ?>" />

    </div><!--/logo-->

    <?php else:?>
    <div id="blogname">
    <h2 class="blogname">/"><?php bloginfo('name'); ?></h2>
    <h2 class="blog-title"><?php bloginfo('description'); ?></h2>
    </div>
    <?php endif;?>

    <?php //Inserts the header ad code ?>
    <?php if ( get_option('swift_header_ad_enable') == "true" && $headerad=get_option('swift_header_adcode') ){ ?>
    <div id="header-ad" class="alignright">
    <?php echo stripslashes($headerad);?>
    </div><!--/header-ad"-->
    <?php }//End of if ?>
    </div>
    </div><!--/header-->
    </div><!--/header-container-->

    <?php navigation(get_option('swift_nav2'),2); ?>

    <?php //Inserts adcode below navigation
    if (get_option('swift_nav_adsense_enable') == "true" && $adcode=get_option('swift_nav_adcode')){ ?>
    <div id="nav-ad-container" class="clearfix">
    <div id="nav-ad" class="grid_960">
    <div class="grid_16">
    <?php echo stripslashes($adcode); ?>
    </div>
    </div>
    </div>
    <?php }//end of if ?>

    <!--Contains content area and sidebar, closing div in footer.php-->
    <div id="main-container" class="grid_960 clearfix">

  2. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    The double Home link may be caused by having a home.php included in the theme and then you added a static home page called "Home" and set it as your front page. Looks like you're using a theme with Swift in it and that you have two navigation menus in your theme:
    <?php navigation(get_option('swift_nav1'),1);?>
    and
    <?php navigation(get_option('swift_nav2'),2); ?>
    Based on above, I would venture that you could set what the links would be in your navigation menus. Have you gone to Appearance > Your theme's options page to see if you can resolve it there? Otherwise, exact theme name or site URL?

  3. luv4music
    Member
    Posted 4 years ago #

    Thanks I managed to find an option to select pages in my 'theme options'

  4. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    Cool, then do change this topic to "resolved" in dropdown on right sidebar.

Topic Closed

This topic has been closed to new replies.

About this Topic