Created
October 3, 2012 04:40
-
-
Save snowman-repos/3825033 to your computer and use it in GitHub Desktop.
Wordpress: Bloginfo Shortcode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function digwp_bloginfo_shortcode( $atts ) { | |
extract(shortcode_atts(array( | |
'key' => '', | |
), $atts)); | |
return get_bloginfo($key); | |
} | |
add_shortcode('bloginfo', 'digwp_bloginfo_shortcode'); | |
[bloginfo key='name'] | |
<img src="[bloginfo key='template_url']/images/logo.jpg" alt="[bloginfo key='name'] logo"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment