bloginfo – template_dir in a shortcode?
-
Hello.
I’m building some shortcodes for my site, and right now I’ve come across a rather annoying problem. This is my code:
function short_design_tab($atts, $content = null) { extract( shortcode_atts( array( 'titel' => 'default', 'bild' => '', ), $atts ) ); return ' <div class="design-tab"> <h3>'. $titel .'</h3> <div class="tab-spacer"></div> <img src="'. bloginfo('template_url') . "/" . $bild .'" alt="" class="big-image" /> ' . do_shortcode($content) . ' </div>'; }The problem is that it doesn’t echo out the template url where I ask it to, but as the first element under the parent element, as regular text. So it appears on the page, in text form. How do I fix this?
Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘bloginfo – template_dir in a shortcode?’ is closed to new replies.