Skip to content

Instantly share code, notes, and snippets.

@danjjohnson
Created September 13, 2012 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danjjohnson/3713496 to your computer and use it in GitHub Desktop.
Save danjjohnson/3713496 to your computer and use it in GitHub Desktop.
Add Post Format shortcode for meta manager
if ( ! function_exists( 'woo_shortcode_post_format' ) ) {
function woo_shortcode_post_format () {
$format = get_post_format( $post->ID );
$output = sprintf('<span class="categories">%s</span> ', $format );
return apply_filters( 'woo_shortcode_post_format', $output, $atts );
} // End woo_shortcode_post_format()
}
add_shortcode( 'post_format', 'woo_shortcode_post_format' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment