Title: Issue with header.php in blog theme
Last modified: August 20, 2016

---

# Issue with header.php in blog theme

 *  [TaylorReints](https://wordpress.org/support/users/taylorreints/)
 * (@taylorreints)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/issue-with-headerphp-in-blog-theme/)
 * My WP blog can be found at [http://pastafarian.host22.com](http://pastafarian.host22.com)
   and, as you can see, it is having a problem.
 * There is a PHP error message that says, “**Warning:** include() [function.include]:
   Failed opening ‘/home/a9603376/public_html/wp-content/themes/city-desk/header-
   types.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in**/
   home/a9603376/public_html/wp-content/themes/city-desk/header.php** on line **
   61**“
 * Here is the City Desk theme’s header.php:
 *     ```
       <!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">
   
       <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
   
       <title><?php gab_title(); ?></title>
   
       	<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
   
       	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if ( of_get_option('of_rssaddr') <> '' ) { echo of_get_option('of_rssaddr'); } else { echo bloginfo('rss2_url'); } ?>" />
       	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
   
       	<?php
       		if ( is_singular() && get_option( 'thread_comments' ) )
       			wp_enqueue_script( 'comment-reply' );
       		wp_head();
       	?>	
   
       	<?php if(file_exists(TEMPLATEPATH . '/custom.css')) { ?>
       		<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/custom.css" />
       	<?php } ?>	
   
       	<!--[if IE 7]>
       		<style type="text/css" media="screen">
       			.dropdown_col,.mainnav ul,.subnav ul {display:none !important}
       			.mainnav .sf-with-ul,.subnav .sf-with-ul {background:none;padding-right:9px !important}
       		</style>
       	<![endif]-->
   
       	<?php if(of_get_option('of_cd_customcolors', 0) == 1) { include (TEMPLATEPATH . '/typography.php'); } ?>
       </head>
   
       <body <?php body_class(); ?>>
   
       <?php gab_categoryad( 'header_728x90' ); ?>
   
       <div class="wrapper">
       	<div id="masthead">
       		<ul class="mastheadnav dropdown">
       			<li class="first<?php if(is_home() ) { ?> current-cat<?php } ?>"><a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>"><?php _e('Home','citydesk'); ?></a></li>
       			<?php if(of_get_option('of_nav1', 0) == 1) {
       				wp_nav_menu( array('theme_location' => 'masthead', 'container' => false, 'items_wrap' => '%3$s'));
       			} else {
       				wp_list_pages('sort_column=menu_order&title_li=&exclude='. of_get_option('of_cd_pages')); ?>
       			<?php } ?>
       			<?php if(of_get_option('of_cd_contribute', 1) == 1) { ?>
       			<li>
       				<a class="show register-button" href="#register-login"><?php _e('Contribute', 'citydesk'); ?></a>
       				<?php register_loginform(); ?>
       			</li>
       			<?php } ?>
       		</ul>		
   
       		<div class="search">
       			<?php get_search_form(); ?>
       		</div>
       	</div><!-- /masthead -->
   
       	<div id="header">
       		<?php include (TEMPLATEPATH . '/header-types.php'); ?>
       	</div><!-- #header -->
   
       	<div id="mainmenu">
       		<ul class="mainnav dropdown">
       			<li class="first<?php if(is_home() ) { ?> current-cat<?php } ?>"><a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>"><?php _e('Home','citydesk'); ?></a></li>
       			<?php
       			/* mega dropdown starts */
       			$cat_count = 5;
       			$options = array();
       			for ($i=1; $i<=$cat_count;$i++) {
       				if(0 < strlen($variable = of_get_option('of_mega'.$i))) {
       					$options[] = $variable;
       				}
       			}
       			foreach ($options as $id => $option)
       			{
       			?>
       				<li class="megadp"><a href="<?php echo get_category_link($option);?>" class="drop"><?php echo get_cat_name($option); ?></a>
   
       						<div class="dropdown_col"><!-- Begin 3 columns container -->
       						<div class="dropdown_inner">
       							<ul class="greybox">
       								<?php
       								$variable = wp_list_categories('show_count=1&title_li=&child_of='.$option);
       								?>
       								<li class="feed"><a href="">RSS Feed</a></li>
       							</ul>
   
       							<div class="dropdown_entries">
       								<?php
       								$count = 1;
       								$args = array(
       								  'cat' => $option,
       								  'posts_per_page' => 3
       								);
       								$gab_query = new WP_Query();$gab_query->query($args);
       								while ($gab_query->have_posts()) : $gab_query->the_post();
       								?>
   
       									<div class="featuredpost<?php if($count == 3) { echo ' lastpost'; } ?>">
       										<h2 class="posttitle<?php if( get_comments_number() > 10 ) { echo ' popular'; } ?>">
       											<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'citydesk' ), the_title_attribute( 'echo=0' ) ); ?>" ><?php the_title(); ?></a>
       										</h2>
       										<p>
       											<?php
       												gab_media(array(
       													'name' => 'an-belowfea',
       													'imgtag' => 1,
       													'link' => 1,
       													'enable_video' => 0,
       													'catch_image' => of_get_option('of_cd_catch_img', 'false'),
       													'enable_thumb' => 1,
       													'resize_type' => 'c',
       													'media_width' => 60,
       													'media_height' => 55,
       													'thumb_align' => 'alignleft',
       													'enable_default' => 'false'
       												));
       											?>
       											<?php echo string_limit_words(get_the_excerpt(),14); ?>…
       										</p>
       									</div><!-- .featuredpost -->
       								<?php $count++; endwhile; wp_reset_query(); ?>
       							</div><!-- dropdown entries -->
       						</div><!-- dropdown_wrapper -->
       					</div><!-- dropdown_col -->
       				</li><!-- megadropdown li -->
       			<?php  } /* mega dropdown ends */
   
       			if(of_get_option('of_nav2', 0) == 1) {
       				wp_nav_menu( array('theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s'));
       			} else {
       				wp_list_categories('orderby='. of_get_option('of_order_cats') .'&order='. of_get_option('of_sort_cats') .'&title_li=&exclude='. of_get_option('of_cd_cats'));
       			}
       			?>
       			<?php if(of_get_option('of_cd_adv', 1) == 1) { ?>
       				<li class="advertise right"><a  class="show adv_here" href="#adv_here"><?php _e('Advertise','citydesk'); ?></a></li>
       			<?php } ?>
       		</ul>
   
       		<div class="clear"></div>
       	</div><!-- #mainmenu -->
   
       	<div id="submenu">
       		<ul class="subnav dropdown">
       		<?php
       			if(of_get_option('of_nav3', 0) == 1) {
       				wp_nav_menu( array('theme_location' => 'secondary', 'container' => false, 'items_wrap' => '%3$s'));
       			} else {
       				wp_list_pages('sort_column=menu_order&title_li=&exclude='. of_get_option('of_cd_pages')); ?>
   
       				<li class="date right">
       					<script type="text/javascript">
       						<!--
       						var mydate=new Date()
       						var year=mydate.getYear()
       						if (year < 1000)
       						year+=1900
       						var day=mydate.getDay()
       						var month=mydate.getMonth()
       						var daym=mydate.getDate()
       						if (daym<10)
       						daym="0"+daym
       						var dayarray=new Array("<?php _e('Sunday','citydesk'); ?>","<?php _e('Monday','citydesk'); ?>","<?php _e('Tuesday','citydesk'); ?>","<?php _e('Wednesday','citydesk'); ?>","<?php _e('Thursday','citydesk'); ?>","<?php _e('Friday','citydesk'); ?>","<?php _e('Saturday','citydesk'); ?>")
       						var montharray=new Array("<?php _e('January','citydesk'); ?>","<?php _e('February','citydesk'); ?>","<?php _e('March','citydesk'); ?>","<?php _e('April','citydesk'); ?>","<?php _e('May','citydesk'); ?>","<?php _e('June','citydesk'); ?>","<?php _e('July','citydesk'); ?>","<?php _e('August','citydesk'); ?>","<?php _e('September','citydesk'); ?>","<?php _e('October','citydesk'); ?>","<?php _e('November','citydesk'); ?>","<?php _e('December','citydesk'); ?>")
       						document.write(""+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"")
       						// -->
       					</script>
       				</li><?php
       			} ?>
       		</ul>
       		<div class="clear"></div>
       	</div><!-- /submenu -->
       ```
   

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

 *  [Christine Rondeau](https://wordpress.org/support/users/crondeau/)
 * (@crondeau)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/issue-with-headerphp-in-blog-theme/#post-3245686)
 * This error:
 * > Failed opening ‘/home/a9603376/public_html/wp-content/themes/city-desk/header-
   > types.php
 * means that it can’t find the file.
    Is that file uploaded? Can you see it in 
   your theme folder?
 *  Thread Starter [TaylorReints](https://wordpress.org/support/users/taylorreints/)
 * (@taylorreints)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/issue-with-headerphp-in-blog-theme/#post-3245689)
 * header-types.php isn’t there. So what should I do?
 *  [Christine Rondeau](https://wordpress.org/support/users/crondeau/)
 * (@crondeau)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/issue-with-headerphp-in-blog-theme/#post-3245691)
 * Go back to the theme distributor or wherever you got the theme from and ask if
   they have it. Otherwise, I would pick a different theme.
 *  Thread Starter [TaylorReints](https://wordpress.org/support/users/taylorreints/)
 * (@taylorreints)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/issue-with-headerphp-in-blog-theme/#post-3245703)
 * Okay. I successfully retrieved header-types.php. However, now there is this error:“**
   Parse error:** syntax error, unexpected $end in **/home/a9603376/public_html/
   wp-content/themes/city-desk/header-types.php** on line **58**“
 * Here is header-types.php:
 *     ```
       <?php 
   
       		/* ******************** IF HEADER WITH A SINGLE IMAGE IS ACTIVATED *************************** */
       		if(of_get_option('of_header_type') == 'singleimage') { ?>
       			<a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>">
       				<img src="<?php echo of_get_option('of_himageurl'); ?>" id="header_banner" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"/>
       			</a>
       		<?php } 
   
       		/* ******************** IF HEADER LOGO - BANNER IS ACTIVATED ********************************* */
       		elseif(of_get_option('of_header_type') == 'logobanner') { ?>
       			<div class="left-2col">
       				<div class="logo" style="padding:<?php echo of_get_option('of_padding_top', 0); ?>px 0px <?php echo of_get_option('of_padding_bottom', 0); ?>px <?php echo of_get_option('of_padding_left', 0); ?>px;">
       					<?php if ( of_get_option('of_logo_type', 'text') == 'image') { ?>
       						<h1>
       							<a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>">
       								<img src="<?php echo of_get_option('of_logo'); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"/>
       							</a>
       						</h1>
       					<?php } else { ?>
       						<h1>
       							<a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>"><?php echo of_get_option('of_logo1'); ?></a>
       							<span><a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>"><?php echo of_get_option('of_logo2'); ?></a></span>
       						</h1>
       					<?php } ?>
       				</div><!-- .logo -->
       			</div><!-- .left-2col -->
   
       			<div class="right-2col" <?php if (of_get_option('of_cd_adm1') <> '') { ?>style="padding-top:<?php echo of_get_option('of_cd_adm1'); ?>px"<?php } ?>>
       				<?php gab_categoryad('header_468x60'); ?>
       			</div><!-- .right-2col -->
   
       		<?php } elseif(of_get_option('of_header_type') == 'logobnews') {
       		/* ******************** IF HEADER LOGO - BREAKING NEWS ********************************* */
       		?>
       			<div class="left-2col">
       				<div class="logo" style="padding:<?php echo of_get_option('of_padding_top', 0); ?>px 0px <?php echo of_get_option('of_padding_bottom', 0); ?>px <?php echo of_get_option('of_padding_left', 0); ?>px;">
       					<?php if ( of_get_option('of_logo_type', 'text') == 'image') { ?>
       						<h1>
       							<a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>">
       								<img src="<?php echo of_get_option('of_logo'); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"/>
       							</a>
       						</h1>
       					<?php } else { ?>
       						<h1>
       							<a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>"><?php echo of_get_option('of_logo1'); ?></a>
       							<span><a href="<?php echo home_url('/'); ?>" title="<?php bloginfo('description'); ?>"><?php echo of_get_option('of_logo2'); ?></a></span>
       						</h1>
       					<?php } ?>
       				</div><!-- .logo -->
       			</div><!-- .left-2col -->
   
       			<?php if (intval(of_get_option('of_nrteaser')) > 0 ) { ?>
       				<div class="right-2col">
       					<div class="entries">
       						<?php
       						$count = 1;
       ```
   
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/issue-with-headerphp-in-blog-theme/#post-3245745)
 * the file is broken; there are only 57 lines in it.
 * if your theme is the theme with the same name by gabfirethemes, contact them 
   for support.
 * if you downloaded the theme from an unreputable source, consider to buy the original
   theme, or use a different theme.

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

The topic ‘Issue with header.php in blog theme’ is closed to new replies.

## Tags

 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [php-error](https://wordpress.org/support/topic-tag/php-error/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/issue-with-headerphp-in-blog-theme/#post-3245745)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
