WordPress.org

Ready to get started?Download WordPress

Forums

Newsletter
[resolved] Paths to images in custom templates (3 posts)

  1. jbx
    Member
    Posted 1 year ago #

    Hi,

    I am trying to create a custom newsletter template following the instructions. I copied one of the default templates (theme-3) and changed the HTML to include a few images, and put everything in the /extensions folder as instructed.

    However, the paths to my images in the same folder are not being resolved.

    I am using the plugins_url() function just like the default templates, for example:

    <img src="<?php echo plugins_url('footer.jpg', __FILE__); ?>

    But I think it should be something different when it is in the extensions/ folder because the path I am getting is totally wrong (its the plugin folder suffixed with the full absolute path of the extensions folder including httpdocs/wp-content/extensions which obviously doesn't make sense from a browser point of view since httpdocs is not publicly exposed.

    What is the right way to include images in a custom template in the extensions folder?

    http://wordpress.org/extend/plugins/newsletter/

  2. Stefano Lissa
    Member
    Plugin Author

    Posted 1 year ago #

    Uhm, try to use the $template_url variable which is defined by Newsletter.
    See the page about theme on my site http://www.satollo.net/plugins/newsletter there should be some instructions... and may be even inside the default theme.

    Stefano.

  3. jbx
    Member
    Posted 1 year ago #

    Thanks. Yes the variable is actually $theme_url
    It works with that. I was just basing my theme on the default theme-3 which uses plugins_url() and it threw me off track.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic