• Resolved btees

    (@btees)


    Can anyone tell me how to achieve this?

    I’ve seen this recommended:

    <?php echo ( do_shortcode( get_post_meta( $post->ID , 'custom-field-name' , true ) ) ); ?>

    But it’s had mixed results, for a portfolio list shortcode it only posts one item and doesn’t display an excerpt as it does elsewhere and for a google map shortcode it creates the div and sizes it correctly but has no content.

    Cheers.

    https://ww.wp.xz.cn/plugins/wck-custom-fields-and-custom-post-types-creator/

Viewing 1 replies (of 1 total)
  • Plugin Author Cristian Antohe

    (@sareiodata)

    Technically it should work, however make sure your shortcode has all the correct parameters for it to work ok.

    To see if that’s the case, do something like this first:

    <?php echo ( get_post_meta( $post->ID , 'custom-field-name' , true ) ); ?>
Viewing 1 replies (of 1 total)

The topic ‘Using shortcodes in custom fields’ is closed to new replies.