0

So I have a image tag in the header.php of the Wordpress theme Twentytwelve like this:

<header id="masthead" class="site-header" role="banner">
    <hgroup>
        <img src="image/logokovil.png" alt="logo" height="100" width="100">
        <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
        <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    </hgroup>

That's part of the code, the problem is that this logo is not being showed, instead I get a invalid image sign on the homepage.

  • The location of the image is: wp-content\themes\twentytwelve\image
  • The location of the header.php: wp-content\themes\twentytwelve

So it looks correct to me, but it still doesn't show me the image? What can be wrong?

1 Answer 1

1

Replace the image code with the below one. Actually you are giving the root path in your image source but the image is in your theme folder. Also check if the images folder name is image or images.

<img src="<?php bloginfo('template_directory'); ?>/image/logokovil.png" alt="logo" height="100" width="100">
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.