Created
September 13, 2012 10:39
-
-
Save danjjohnson/3713496 to your computer and use it in GitHub Desktop.
Add Post Format shortcode for meta manager
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
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