[wp-hackers] Registering shortcodes for meta boxes
Jeffrey Nolte
jnolte at getmoxied.net
Thu Nov 17 22:32:24 UTC 2011
Thank you Steve! That makes total sense.
-Jeffrey Nolte
On Nov 17, 2011, at 5:27 PM, Steve Taylor wrote:
> 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.
>
> Steve
>
>
> 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
>>
> _______________________________________________
> 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