Created
November 23, 2011 16:19
-
-
Save beneverard/1389103 to your computer and use it in GitHub Desktop.
Exposing WP url using shortcode
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
<?php | |
// slap this in your functions file | |
function wp_url_func($atts, $content=null) | |
{ | |
return get_bloginfo('wp_url'); | |
} | |
add_shortcode('wp_url', 'wp_url_func'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment