Title: Shortcode in Custom Field
Last modified: August 31, 2016

---

# Shortcode in Custom Field

 *  [gracebay](https://wordpress.org/support/users/gracebay/)
 * (@gracebay)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-in-custom-field-2/)
 * I created a customer field for a shortcode.
    I entered the following in the field:[
   widgetkit id=”2″]
 * I tried different outputs but just got “array” or “[widgetkit id=”2″]”
 * What do I need to set the output to in order for the shortcode to render correctly?
   It is suppose to display a slide show.
 * I put this in my template file: <?php print_custom_field(‘widgetkitshortcode’);?
   >
 * [https://wordpress.org/plugins/custom-content-type-manager/](https://wordpress.org/plugins/custom-content-type-manager/)

Viewing 1 replies (of 1 total)

 *  [Peter Hardy-vanDoorn](https://wordpress.org/support/users/petervandoorn/)
 * (@petervandoorn)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-in-custom-field-2/#post-6986656)
 * If the field is only to contain the shortcode, you use this:
 * `echo do_shortcode( get_custom_field( 'widgetkitshortcode' ) );`
 * If the field also contains text and you want the shortcode to be processed just
   like in the_content, use this:
 * `echo apply_filters( 'the_content',get_custom_field( 'widgetkitshortcode' ) );`

Viewing 1 replies (of 1 total)

The topic ‘Shortcode in Custom Field’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-type-manager_c9c790.
   svg)
 * [Custom Content Type Manager](https://wordpress.org/plugins/custom-content-type-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-content-type-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-type-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-type-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-type-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-type-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Peter Hardy-vanDoorn](https://wordpress.org/support/users/petervandoorn/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-in-custom-field-2/#post-6986656)
 * Status: not resolved