@smokey the code I used I a wee bit different than Colin's. It may very well include some bad practise. I converted it to a shortcode plugin gist