Title: Header code is a mess! Please help
Last modified: August 21, 2016

---

# Header code is a mess! Please help

 *  [LizziaStraw](https://wordpress.org/support/users/lizziastraw/)
 * (@lizziastraw)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/)
 * So this is my header code
 *     ```
       <?php
       /**
        * @package WordPress
        * @subpackage StrawberriCurls Theme
        */
       $options = get_option( 'gopress_theme_settings' );
       ?>
       <!DOCTYPE html>
   
       <!-- BEGIN html -->
       <html <?php language_attributes(); ?>>
   
       <!-- BEGIN head -->
       <head>
       <title>"Natural Hair Care and Natural Hairstyles For Black Women | Strawberricurls"</title>
       <meta content = "Natural hair blog with topics such as natural black hair care,natural Hairstyles For Black Women, natural hair tutorials, the big chop, transition from relaxed hair to natural hair, short natural hair styles" name="description"/>
       <meta content= "black hair, grow natural hair fast, natural hair, blog, natural hair care, natural curly hair styles, natural hair products, curly hair, kinky hair, roller set, black hair, transition, BC, Big Chop, healthy black hair, long natural hair, natural hair damage, split ends, dry natural hair, afro hair damage, natural hair split ends, prevent split ends, roller set natural hair, styling natural hair, curly fro, roller set, wet set natural hair, cut natural hair, curly hair, hair shears, blunt, layers, layered, afro shapes, learning how to cut natural hair to maximize growth and volume, detangle natural hair, detangle curly hair, natural hair, curly hair, brush,afro hair, a tutorial on how to detangle natural hair to reduce damage,splits,and breakage, relaxed to natural, cut relaxed ends, long transition, short transition, alternatives to Big Chopping, ways to style black hair, twist, braid, braid out, relaxer, healthy hair, wash and go,natual hair bun , routine for natural hair, natural hair regimen, products, styling, style, shea butter, video tutorial, long black hair, natural hair forum"  name="keywords" />
   
       <script src="http://static.dudamobile.com/DM_redirect.js" type="text/javascript"></script>
       <script type="text/javascript">DM_redirect("http://mobile.dudamobile.com/site/strawberricurls");</script>
       <!-- Meta Tags -->
       <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
   
       <?php
       $blog_title = get_bloginfo('name');
       if (is_home()) {
           $blog_title = get_bloginfo('name') . " | " . get_bloginfo('description');
       }
       if (is_single()) {
           $blog_title = get_the_title();
       }
       if (is_category()) {
           $blog_title = single_cat_title("",false) . " archive | " . get_bloginfo('name');
       }
       if (is_page()) {
           $blog_title = the_title();
       } 
   
       ?>
       <title><?php echo $blog_title; ?></title>
       <html>
       	<head>
       		<meta name="msvalidate.01" content="FB4FB60C55E0F4D3A0B25409F02F35DF" />
       	</head>
       	<body>
       		page contents
       	</body>
       </html>
   
       <!-- Stylesheet & Favicon -->
       <?php if($options['favicon'] !='') { ?>
       <link rel="icon" type="image/png" href="<?php echo $options['favicon']; ?>" />
       <?php } ?>
       <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />
   
       <!-- WP Head -->
       <?php if ( is_single() || is_page() ) wp_enqueue_script( 'comment-reply' ); ?>
       <?php wp_head(); ?> 
   
       <script type="text/javascript">
       (function(d){
         var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
         p.type = 'text/javascript';
         p.async = true;
         p.src = '//assets.pinterest.com/js/pinit.js';
         f.parentNode.insertBefore(p, f);
       }(document));
       </script>
   
       </head>
       <body <?php body_class(); ?>>
   
       <div id="wrap" class="clearfix">
   
       <div id="header" class="clearfix">
   
       	<div id="header-top" class="clearfix">
               <div id="logo" style="margin-top: <?php if(!empty($options['logo_margin'])) { echo $options['logo_margin']; } else { echo '0'; } ?>px;">
               	<?php
                   	if(!empty($options['upload_mainlogo'])) { ?>
       					<a>/" title="<?php bloginfo( 'name' ); ?>"><img src="<?php echo $options['upload_mainlogo']; ?>" alt="<?php bloginfo( 'name' ) ?>" /></a>
       			 	<?php } else { ?>
                   	<a>/" title="<?php bloginfo( 'name' ); ?>"><?php bloginfo( 'name' ) ?></a>
                   <?php } ?>
               </div>
               <!-- END logo -->
   
               <?php if(!empty($options['header_banner'])) { ?>
               	<div id="header-banner"><?php echo $options['header_banner']; ?></div>
               <?php } ?> 
   
       	</div>
   
       	<?php
           $side_description = get_bloginfo( 'description' );
           if(!empty($side_description)) { echo '<div id="site-description">'. $side_description.'</div>'; }
           ?>
   
       </div><!-- END header -->
       <center><?php echo adrotate_ad(3); ?></center>
   
               <div id="navigation" class="clearfix">
                   <?php
                   //define main navigation
                   wp_nav_menu( array(
                       'theme_location' => 'menu',
                       'sort_column' => 'menu_order',
                       'menu_class' => 'sf-menu',
                       'fallback_cb' => 'default_menu'
                   )); ?>
               </div>
               <!-- END navigation -->
       <script id="mNCC" language="javascript">  medianet_width='728';  medianet_height= '90';  medianet_crid='361840890';  </script>  <script id="mNSC" src="http://contextual.media.net/nmedianet.js?cid=8CU4B4YCL" language="javascript"></script>
       ```
   
 * I am not sure how to clean it up and its a mess! I don’t want to add anymore 
   choas and now my adsense won’t load. I have temporarily replaced it with the 
   yahoo code at the very bottom but the script wasn’t loading for adsense. Any 
   help?

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

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185172)
 * What theme is this? Where did you download it from?
 *  Thread Starter [LizziaStraw](https://wordpress.org/support/users/lizziastraw/)
 * (@lizziastraw)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185234)
 * [@wpyogi](https://wordpress.org/support/users/wpyogi/) its a custom made template
 *  [Swayze](https://wordpress.org/support/users/shelbyswayze/)
 * (@shelbyswayze)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185237)
 * I notice you have two </head> tags. I’m a noobie so I just noticed and don’t 
   necessarily know if it’s normal.
 *  [Swayze](https://wordpress.org/support/users/shelbyswayze/)
 * (@shelbyswayze)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185243)
 * One problem might be a head section within a head section the way you have it.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185244)
 * No, two closing head tags is not normal and it’s an error.
 * **[@lizziastraw](https://wordpress.org/support/users/lizziastraw/)** – why is
   it messed up? Have you modified it? Do you have a backup? Have you asked the 
   people who made it for you?
 *  Thread Starter [LizziaStraw](https://wordpress.org/support/users/lizziastraw/)
 * (@lizziastraw)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185248)
 * [@shelbyswayze](https://wordpress.org/support/users/shelbyswayze/) no that is
   def an error. I wasn’t sure which one to close.
    [@wpyogi](https://wordpress.org/support/users/wpyogi/)
   i have no idea. Maybe from all the plugins? and no i don’t. Ill ask her
 *  [Swayze](https://wordpress.org/support/users/shelbyswayze/)
 * (@shelbyswayze)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185274)
 * Hi Lizzia, I don’t know if you have resolved your problem but in relation to 
   which <head> tags to remove I would try leaving the outside start and close tags
   and remove any head tags within and see how it reacts.

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

The topic ‘Header code is a mess! Please help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [Swayze](https://wordpress.org/support/users/shelbyswayze/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/header-code-is-a-mess-please-help/#post-4185274)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
