[wp-hackers] Registering shortcodes for meta boxes

Steve Taylor steve at sltaylor.co.uk
Thu Nov 17 22:27:44 UTC 2011

Shortcodes get parsed when stuff goes through 'the_content' filter.
Obviously this automatically gets applied by the_content(), but for
anything else, either do this:

echo apply_filter( 'the_content', $my_meta_box_content );

Or, if you ONLY want the shortcodes parsing (and not everything else
that's hooked to the_content):

echo do_shortcode( $my_meta_box_content );

I think these should do the trick.


On 17 November 2011 20:21, Jeffrey Nolte <jnolte at getmoxied.net> wrote:
> Is there a certain way to add a shortcode to  meta box.  The registered shortcode does not seem to be showing up when used in a meta box.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list