• Hi I’m trying to sort out why my custom header will not call I have set up a custom Post Template and save a custom header which have named header-blog.jpg and the post template is named single-review.php mark up shown below.

    <?php
    /*
    Single Post Template: Usher Review Template
    Description: This post template is speficically for the Usher Reviews on this website where it has a different header
    */
    get_header("blog");
    ?>
    			<?php get_sidebar('top'); ?>
    			<?php
    			if (have_posts()) {
    				/* Display navigation to next/previous posts when applicable */
    				if (theme_get_option('theme_top_single_navigation')) {
    					theme_page_navigation(
    							array(
    								'next_link' => theme_get_previous_post_link('&laquo; %link'),
    								'prev_link' => theme_get_next_post_link('%link &raquo;')
    							)
    					);
    				}
    				while (have_posts()) {
    					the_post();
    					get_template_part('content', 'single');
    					/* Display comments */
    					if (theme_get_option('theme_allow_comments')) {
    						comments_template();
    					}
    				}
    				/* Display navigation to next/previous posts when applicable */
    				if (theme_get_option('theme_bottom_single_navigation')) {
    					theme_page_navigation(
    							array(
    								'next_link' => theme_get_previous_post_link('&laquo; %link'),
    								'prev_link' => theme_get_next_post_link('%link &raquo;')
    							)
    					);
    				}
    			} else {
    				theme_404_content();
    			}
    			?>
    			<?php get_sidebar('bottom'); ?>
    <?php get_footer(); ?>

    I have also made a specific header file called header-blog.php

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo('charset') ?>" />
    <title><?php wp_title('|', true, 'right'); bloginfo('name'); ?></title>
    <meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width">
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" media="screen" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php
    remove_action('wp_head', 'wp_generator');
    if (is_singular() && get_option('thread_comments')) {
    	wp_enqueue_script('comment-reply');
    }
    wp_head();
    ?>
    </head>
    <body <?php body_class(); ?>>
    
    <div id="art-main">
    
    <?php if(theme_has_layout_part("header")) : ?>
    <header class="clearfix art-header<?php echo (theme_get_option('theme_header_clickable') ? ' clickable' : ''); ?>"><?php get_sidebar('header'); ?>
    
        <div class="art-shapes">
    
                </div>
    
    </header>
    <?php endif; ?>
    
    <nav class="art-nav clearfix">
        <?php
    	echo theme_get_menu(array(
    			'source' => theme_get_option('theme_menu_source'),
    			'depth' => theme_get_option('theme_menu_depth'),
    			'menu' => 'primary-menu',
    			'class' => 'art-hmenu'
    		)
    	);
    ?>
        </nav>
    <div class="art-sheet clearfix">
                <div class="art-layout-wrapper clearfix">
                    <div class="art-content-layout">
                        <div class="art-content-layout-row">
                            <div class="art-layout-cell art-content clearfix">

    I can see the template for my post page as I installed Single Post Template which allows me to alter the template for specific posts, this works perfectly well and I can call the template when I write a specific post, but I can’t seem to get my alternative header to show up.
    Is there anyone who can help me pin point why this is happening.
    Many thanks

  • The topic ‘Custom Post Template and header’ is closed to new replies.