Title: Process custom fields
Last modified: August 22, 2016

---

# Process custom fields

 *  [CroiSciento](https://wordpress.org/support/users/croisciento/)
 * (@croisciento)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/process-custom-fields/)
 * Hello,
 * I’ve created custom metaboxes for my custom post type and now I’m trying to “
   process” code from my metaboxes.
 * I am using this plugin to display carousels. The user interface creates a string
   that’s used to generate the carousel, for example :
 * `[fwdu3dcar preset_id="20" playlist_id="5"]`
 * My only issue now is that when writing this in my custom field it just displays
   the raw string instead of showing the carousel. When writing this in the “main”
   block it does display correctly.
 * here’s a bit of my code :
 *     ```
       <?php $carrousel1 = get_post_meta(get_the_ID(), '_choix_1', true); ?>
       <?php echo $carrousel1; ?>
       ```
   
 * Well I’m aware echo only displays a string, but I don’t really see with which
   method I should pass my variable, so it can do something like the “the_content()”
   method. Any hint? Thanks!

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

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/process-custom-fields/#post-5750766)
 * Hi CroiSciento
 * Try it with the do_shortcode() function.
    [http://codex.wordpress.org/Function_Reference/do_shortcode](http://codex.wordpress.org/Function_Reference/do_shortcode)
 *     ```
       <?php
       $carrousel1 = get_post_meta( get_the_ID(), '_choix_1', true );
       if ( !empty( $carrousel1 ) ) {
       	echo do_shortcode( $carrousel1 );
       }
       ?>
       ```
   
 *  Thread Starter [CroiSciento](https://wordpress.org/support/users/croisciento/)
 * (@croisciento)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/process-custom-fields/#post-5750768)
 * Wow, thanks you that’s exactly what I wanted. I’ve been looking for the wrongs
   terms. Thanks again !
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/process-custom-fields/#post-5750778)
 * You’re welcome. I’m glad you’ve got it resolved 🙂

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

The topic ‘Process custom fields’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/process-custom-fields/#post-5750778)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
