A small snippet for WordPress Bloginfo. This will help you to add images directly without giving the entire path. Its a shortcode snippet
function get_bloginfo_shortcode( $atts ) {
extract(shortcode_atts(array(
'info' => '',
), $atts));
return get_bloginfo($info);
}
add_shortcode('bloginfo', 'get_bloginfo_shortcode');
Usage :
<img src="[bloginfo info='template_url']/images/logo.jpg" alt="[bloginfo info='name'] logo" />
Now you can easily call your images without giving actual path.
Credits Forrst
WordPress Bloginfo Shortcode,
Help us to keep this website LIVE.
OR
Follow @webstutorialOR
Skip