If you’re like me then you like full control over your posts. In a recent post I wanted to include a picture that was within the theme directory rather than having uploaded it. Now I can’t be bothered to write out the full URL to the theme so instead I created a quick shortcode that allows you to access WordPress’s ‘bloginfo‘ from within your posts:
{
return get_bloginfo( $a[ 'get' ] );
}
add_shortcode( 'bloginfo', 'handle_shortcode_bloginfo' );
To use it you simply add [bloginfo get=”bloginfo_to_get”] and that’s it.