Support » Plugins and Hacks » [Resolved] Paths to images in custom templates

[Resolved] Paths to images in custom templates

  • 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?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stefano Lissa


    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.


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Paths to images in custom templates’ is closed to new replies.