WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] image path in widget (3 posts)

  1. averiz@mac.com
    Member
    Posted 4 years 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" />

    the site is
    efl.averiz.com

    Any thoughts as to what I did wrong?
    Cheers
    mr

  2. esmi
    Forum Moderator
    Posted 4 years ago #

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

  3. averiz@mac.com
    Member
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags