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

---

# Using Shortcode in Custom Fields

 *  [mckaymultimedia](https://wordpress.org/support/users/mckaymultimedia/)
 * (@mckaymultimedia)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/using-shortcode-in-custom-fields/)
 * I have an audio/video player that uses shortcodes to display the player. In the
   theme I am using the code for audio/video players is suppose to be entered in
   a custom field. I need to be able to have shortcodes parsed in this specific 
   custom field in my theme. This is the isolated portion of the code in my single.
   php that calls on the custom field that I am dealing with:
 *     ```
       <div class="entry">
       <?php $video_code = thman_getcustomfield('video_code',get_the_ID()); if(!empty($video_code)) : ?><div class="video_code"><?php echo $video_code; ?></div><?php endif; ?>
       ```
   
 * I need this section to check if the video_code field contains shortcode and if
   so parse the shortcode so that it will be processed and appear in the post as
   it would if the shortcode was inserted in the editor. If not then just process
   as normal.
 * I have tried several different fixes from various forums to get this to work.
   I am in great need of some

Viewing 1 replies (of 1 total)

 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/using-shortcode-in-custom-fields/#post-2348774)
 * Double post: [answers here please](http://wordpress.org/support/topic/using-shortcode-in-custom-fields-1?replies=2)!

Viewing 1 replies (of 1 total)

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

## Tags

 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 2 participants
 * Last reply from: [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/using-shortcode-in-custom-fields/#post-2348774)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
