Support » Plugins » template tags in calling an image

  • This is the problem I want a certain piece of code to become universal, which can be called on any site with any directories as long as the image is in the /themes/themename/images/ folder ..

    this code works on my site: and it works

    <span class="metalink"><?php comments_popup_link('<img src="/wp-content/themes/K2_MarkMS/images/comments_icon.png">comment?', '<img src="/wp-content/themes/K2_MarkMS/images/comments_icon.png">1 <span>comment</span>', '<img src="/wp-content/themes/K2_MarkMS/images/comments_icon.png">% <span>comments</span>', '', ' '); ?></span>

    Now I have been trying to use template tags and even the TEMPLATEPATH . to call the image, and still nothing works. I want people to have the ability to name the themename folder to anything and the image still gets called. I want it to be like this but operational.

    <span class="metalink"><?php comments_popup_link('<img src="theme directory/images/comments_icon.png">comment?', '<img src="theme directory/images/comments_icon.png">1 <span>comment</span>', '<img src="theme directory/images/comments_icon.png">% <span>comments</span>', '', ' '); ?></span>

    any ideas? Ive tried placing a “get_bloginfo (‘template_url’) inside the parentheses of <?php comments_popup_link( and even tried placing the TEMPLATEPATH . ‘<img src= >

    I’m really getting quite irritated with the hours I have spent trying to fix it.

  • The topic ‘template tags in calling an image’ is closed to new replies.