silvija siksniute
silvija siksniute

Reputation: 21

Custom wordpress theme images not displaying

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

Answers (3)

Ras Au-t Amam
Ras Au-t Amam

Reputation: 11

Change all image to src=" <?php echo get_template_directory_uri();?> /images/picname.jpg"

Upvotes: 1

jay.jivani
jay.jivani

Reputation: 1574

See: bloginfo

<img src="<?php bloginfo('template_url'); ?>/images/logo.jpg" alt="<?php bloginfo('name'); ?>">

Upvotes: 1

Jothi Kannan
Jothi Kannan

Reputation: 3358

you must use <?php bloginfo('template_directory'); ?>/images/freephone.png to get the images in the current theme.

Upvotes: 2

Related Questions