Support » Fixing WordPress » How do I link to an image with PHP code?

  • I’ve made a hover button for my feedburner RSS in my header and works fine as I have it linking directly on my URL.

    I want to re-distribute my theme, so I need to reference that hover button to the URL that the theme will be used on. What code do I use to do this? Here is the hover button code, that works on my site:

    <div id="headerright">
    <input type="hidden" value="<?php $feedburner_id = get_option('revlifestyle_feedburner_id'); echo $feedburner_id; ?>" name=""/>
    <a href="<?php bloginfo('rss_url'); ?>"
    <img name="image1" src="" border=0></a> border=0></a>
Viewing 1 replies (of 1 total)
  • I think this would do it…

    <?php bloginfo('template_directory'); ?>

    So for your image source you would have something like…

    <?php bloginfo('template_directory'); ?>/images/rss-hov-maroon.png

Viewing 1 replies (of 1 total)
  • The topic ‘How do I link to an image with PHP code?’ is closed to new replies.