Title: Using Shortcodes in Custom Fields?
Last modified: August 20, 2016

---

# Using Shortcodes in Custom Fields?

 *  [futurepocket](https://wordpress.org/support/users/futurepocket/)
 * (@futurepocket)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/using-shortcodes-in-custom-fields/)
 * I have a theme which has a “PRICE” custom field which only accepts text or numerical
   values. Is there a way I can parse shortcodes in that custom field? Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/using-shortcodes-in-custom-fields/#post-2975046)
 * I think you would need to modify the template which displays the custom field
   to run the [do_shortcode() function](http://codex.wordpress.org/Function_Reference/do_shortcode)
   on the value.
 *  [codingpet](https://wordpress.org/support/users/codingpet/)
 * (@codingpet)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/using-shortcodes-in-custom-fields/#post-2975047)
 *     ```
       <?php
       if ( get_post_meta($post->ID, 'PRICE', true) )
       echo do_shortcode(get_post_meta($post->ID, 'PRICE', $single = true));
       ?>
       ```
   
 * Similar codes will work but not fully tested.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using Shortcodes in Custom Fields?’ is closed to new replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [codingpet](https://wordpress.org/support/users/codingpet/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/using-shortcodes-in-custom-fields/#post-2975047)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
