WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] image path in widget

[Resolved] image path in widget

  • 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" />

    the site is
    efl.averiz.com

    Any thoughts as to what I did wrong?
    Cheers
    mr

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    @esmi

    Forum Moderator

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] image path in widget’ is closed to new replies.
Skip to toolbar