Image not displaying in header.php (7 posts)

  1. MrBrownUK
    Posted 2 years ago #

    I've inserted an image in header.php but it will not display and I cannot locate any CSS that may cause this to happen.

    <body <?php body_class(); ?>>
    	<div id="page" class="hfeed site">
    		<header id="masthead" class="site-header" role="banner">
              <img src="images/APC-Overnight-Shrewsbury-Logo.jpg" width="175" height="164" alt="APC Overnight Shrewsbury Logo" class="headerLogo">
              <a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    		  <h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
    				<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    		  <div id="navbar" class="navbar">
    			<nav id="site-navigation" class="navigation main-navigation" role="navigation">
    					<h3 class="menu-toggle"><?php _e( 'Menu', 'twentythirteen' ); ?></h3>
    					<a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentythirteen' ); ?>"><?php _e( 'Skip to content', 'twentythirteen' ); ?></a>
    					<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    					<?php get_search_form(); ?>
    			</nav><!-- #site-navigation -->
    		  </div><!-- #navbar -->
    </header><!-- #masthead -->
  2. Alex Hodge
    Posted 2 years ago #

    Try removing the class

    Let me no how it goes!

  3. MrBrownUK
    Posted 2 years ago #

    Hi Alex,

    It makes no difference, I have also disabled CSS from within Firefox and it continues to only display the alt tag data.

    I'm still digging around!

  4. Alex Hodge
    Posted 2 years ago #

    what theme are you using?

  5. Alex Hodge
    Posted 2 years ago #

    If you are using twenty thirteen you can go to Appearance > Header in your wordpress
    dashboard then insert your header image there?

  6. MrBrownUK
    Posted 2 years ago #


    I'm trying to include the logo with absolute positioning on top of the background.

  7. manojrohtela
    Posted 2 years ago #

    <?php bloginfo('template_directory'); ?>/images/APC-Overnight-Shrewsbury-Logo.jpg

    use this as img src

Topic Closed

This topic has been closed to new replies.

About this Topic