Ahmed Nuaman


builder of internets ~ developer of dreams ~ tamer of Dachshunds

Accessing WordPress’s ‘bloginfo’ from a post

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’sbloginfo‘ from within your posts:

function handle_shortcode_bloginfo($a)
{
    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.

Where have comments gone?

Good question my old fruity. I'm now sticking any post discussions on Google+. Why? Well simply it's better. WordPress's comment system isn't very elegant and nor are ones like Disqus or Livefyre, so to save hassle I've just shipped them off to a social network, like a real boss.

Search

My social skills

Latest blog posts

  • Loading posts...

Subscribe in a reader

Latest tweets

  • Loading tweets...