Title: Using shortcodes in custom fields
Last modified: August 30, 2016

---

# Using shortcodes in custom fields

 *  Resolved [btees](https://wordpress.org/support/users/btees/)
 * (@btees)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/using-shortcodes-in-custom-fields-1/)
 * 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://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/](https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Cristian Antohe](https://wordpress.org/support/users/sareiodata/)
 * (@sareiodata)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/using-shortcodes-in-custom-fields-1/#post-6757544)
 * 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.

 * ![](https://ps.w.org/wck-custom-fields-and-custom-post-types-creator/assets/icon-
   256x256.png?rev=2257602)
 * [Custom Post Types and Custom Fields creator - WCK](https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/)
 * [Active Topics](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Cristian Antohe](https://wordpress.org/support/users/sareiodata/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/using-shortcodes-in-custom-fields-1/#post-6757544)
 * Status: resolved