WordPress.org

Ready to get started?Download WordPress

Forums

Image not displaying in header.php (7 posts)

  1. MrBrownUK
    Member
    Posted 8 months 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>
    		  </a>
    
    		  <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
    Member
    Posted 8 months ago #

    Try removing the class
    class="headerLogo"

    Let me no how it goes!

  3. MrBrownUK
    Member
    Posted 8 months 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
    Member
    Posted 8 months ago #

    what theme are you using?

  5. Alex Hodge
    Member
    Posted 8 months 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
    Member
    Posted 8 months ago #

    TwentyThirteen

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

  7. manojrohtela
    Member
    Posted 8 months ago #

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

    use this as img src

Reply

You must log in to post.

About this Topic