Reputation: 21
I'm building my first WP theme. My images are linked this way:
<img src="<?php bloginfo('wp-content/themes/SRPrint'); ?>images/freephone.png" />
Obviously theme folder called SRPrint and inside it there is an images folder.
Can't understand why images do not show up? I don't know any php so I asume problem is in php code? Images specified through style.css show up ok.
Please help.
Link to test site http://www.designstest.co.uk/
Upvotes: 1
Views: 1957
Reputation: 11
Change all image to src="
<?php echo get_template_directory_uri();?>
/images/picname.jpg"
Upvotes: 1
Reputation: 1574
See: bloginfo
<img src="<?php bloginfo('template_url'); ?>/images/logo.jpg" alt="<?php bloginfo('name'); ?>">
Upvotes: 1
Reputation: 3358
you must use <?php bloginfo('template_directory'); ?>/images/freephone.png
to get the images in the current theme.
Upvotes: 2