• 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="http://feeds2.feedburner.com/"/>
    
    <a href="<?php bloginfo('rss_url'); ?>"
    
    onmouseover="image1.src='http://www.mysite.com/wp-content/themes/mytheme/images/rss-hov-maroon.png';"
    onmouseout="image1.src='http://www.mysite.com/wp-content/themes/mytheme/images/rss-maroon.png';">
    <img name="image1" src="http://www.mysite.com/wp-content/themes/mytheme/images/rss-maroon.png" border=0></a> border=0></a>
    
    	</div>
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.