I was wondering if there is a filter that allows me to enable short codes to work inside the custom meta fields in my posts.
I know the following code enables it in widgets:
And where would I have to put a code? My theme has shortcodes.php also meta-boxes.php
P.S I've asked this question on stackexchange.com
And I also found some similar question here:
But I can't figure out where to put these codes that they are offering? I've called my custom field "best" (without quotes). So if what they say is true the code I need to use should look like this echo
<?php do_shortcode( get_post_meta($post->ID, 'best', true) ); ?>
This thing depends on where you want to use metabox in your theme files.
you can use either use
<?php echo do_shortcode( get_post_meta($post->ID, 'best', true) ); ?>
<?php echo apply_filters('the_content', get_post_meta($post->ID, 'best', true)); ?>
I've tried to insert both codes in to my custom field before the short code, but here is what I can see now (see image attached)
Any ideas what I could have done wrong?