• Resolved Michiel Koekkoek

    (@michiel-koekkoek)


    hello Fahad, I installed WHI and selected images for a few pages. For those pages the selected image is shown but immediately after the ‘default’ header image is shown. Pages with no selected images show only the default header image. I suppose i wrongly inserted the code line <?php do_shortcode(‘[WP_HEADER_IMAGES]’); ?> in the wrong place in header.php of my theme Colinear. The code is as follows:

    <?php
    /**
     * The header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package Colinear
     */
    
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'colinear' ); ?></a>
    
    	<header id="masthead" class="site-header" role="banner">
    		<div class="site-branding">
    			<?php colinear_the_site_logo(); ?>
    
    			<?php
    				if ( is_front_page() && is_home() ) : ?>
    					<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    				<?php else : ?>
    					<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
    				<?php endif;
    
    				$description = get_bloginfo( 'description', 'display' );
    				if ( $description || is_customize_preview() ) : ?>
    					<p class="site-description"><?php echo $description; ?></p>
    				<?php endif;
    			?>
    		</div><!-- .site-branding -->
    
    		<?php if ( has_nav_menu( 'primary' ) ) : ?>
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><span class="screen-reader-text"><?php esc_html_e( 'Primary Menu', 'colinear' ); ?></span></button>
    			<?php
    				// Primary navigation menu.
    				wp_nav_menu( array(
    					'theme_location' => 'primary',
    					'menu_id'        => 'primary-menu',
    				) );
    			?>
    		</nav><!-- #site-navigation -->
    		<?php endif; ?>
    
    		<?php if ( get_header_image() ) : ?>
    		<?php do_shortcode('[WP_HEADER_IMAGES]'); ?>
    		<div class="header-image">
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    				<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="">
    			</a>
    		</div><!-- .header-image -->
    		<?php endif; // End header image check. ?>
    	</header><!-- #masthead -->
    
    	<div id="content" class="site-content">

    Could you be so kind to have a look?
    Thanks in advance and greetings,
    Michiel Koekkoek

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Default Header Image shown under Image selected with WHI’ is closed to new replies.