Forums
Forums / Fixing WordPress / image path in widget
(@averizmaccom)
16 years, 2 months ago
Hi All, I put a jpeg in the images folder of my template.
I am trying to call the image like so: <img src="<?php bloginfo('magazine-basic'); ?>/images/calendar-icon.png" width="160" height="160" alt="Calendar of Events" />
<img src="<?php bloginfo('magazine-basic'); ?>/images/calendar-icon.png" width="160" height="160" alt="Calendar of Events" />
the site is efl.averiz.com
Any thoughts as to what I did wrong? Cheers mr
(@esmi)
If the image file is in the images folder of your theme, you need to use something like:
<img src="<?php bloginfo('template_directory'); ?>/images/calendar-icon.png" width="160" height="160" alt="Calendar of Events" />
Thanks – I got it now. I thought template_directory was a place holder for the themes folder. Also – I needed to add the advanced text widget plugin.
All good now though! CHeers mr
The topic ‘image path in widget’ is closed to new replies.