Created
September 12, 2013 17:46
-
-
Save brandonhimpfen/6541278 to your computer and use it in GitHub Desktop.
Will show the parameter of the WordPress bloginfo function.
This file contains 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
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 |
This file contains 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
// 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