Skip to content Skip to sidebar Skip to footer

Img Src Correct, But Still Not Working In Index.php

I believe I've correctly sourced an image in html for a (super-basic) wordpress theme I am developing; however it still does not display. This dialogue: Img Src on local computer s

Solution 1:

In the img element the src attribute should look like this

<?php bloginfo( 'template_url' );?>/images/pmsplogo.jpg

So basically the full image url will be:

<imgsrc="<?php bloginfo( 'template_url' );?>/images/pmsplogo.jpg"alt="Peter Maurin Screenprinters"/>

Solution 2:

<imgsrc="<?phpecho'dirname(__FILE__)'.'/images/pmsplogo.jpg'?>" />

Dont write with "http://www.yoursitename.com/" in PHP, they can't find source with it.

Post a Comment for "Img Src Correct, But Still Not Working In Index.php"