Here is the code that I am referring to:
<?php if ( is_archive() ) { echo '<img src="'.bloginfo('template_url').'/images/test.png" />'; }?>
This is what the code outputs: http://site.com/wp-content/themes/themename
I’d like it to output the actual image in the code. What part of this did I overlook?
bloginfo()doesn’t output the string. It echo’s it directly to output stream.So, the code should be:
Or else, you can use
get_bloginfo():