Using Shortcodes in Custom Meta Boxes

Home Forums WPAlchemy Using Shortcodes in Custom Meta Boxes

This topic contains 0 replies, has 1 voice, and was last updated by  bej-san 8 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2734

    bej-san
    Participant

    Hi there,

    I am sorry if this topic is already been talked through, but I can’t find anything on the net or here:

    I have an area in my template where I want to show media, not in the content area.

    How can I use shortcodes in my meta box? I find this code everywhere but I can’t get it to work the way I want to with alchemy.
    echo apply_filters('the_content', get_post_meta($post->ID, 'your_custom_field_here', true));

    I call my metabox with $meta = $feature_mb->the_meta(); and the content with echo $meta['regularfield'];

    I can’t use do_shortcode because the field should be capable of different types of shortcode e.g. gallery, soundcloud, youtube, php(syntax highlight)

    • This topic was modified 8 months ago by  bej-san.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.