Skip to content

Instantly share code, notes, and snippets.

@brandonhimpfen
Created September 12, 2013 17:46
Show Gist options
  • Save brandonhimpfen/6541278 to your computer and use it in GitHub Desktop.
Save brandonhimpfen/6541278 to your computer and use it in GitHub Desktop.
Will show the parameter of the WordPress bloginfo function.
Use [bloginfo value="name"] to display the output. Replace name with the parameter you want.
List of parameters can be found at http://codex.wordpress.org/Template_Tags/bloginfo
// Bloginfo shortcode
function bloginfo_shortcode( $atts ) {
extract(shortcode_atts(array(
'value' => '',
), $atts));
return get_bloginfo($value);
}
add_shortcode('bloginfo', 'bloginfo_shortcode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment