Title: Display custom multi-select fields
Last modified: June 2, 2020

---

# Display custom multi-select fields

 *  Resolved [cono02](https://wordpress.org/support/users/cono02/)
 * (@cono02)
 * [6 years ago](https://wordpress.org/support/topic/display-custom-multi-select-fields/)
 * Hi
    I have added some custom fields using the Field Editor which was easy enough.
   I have also been able to display a Single Select field adding the following code
   in the content-single-event-listing.php override file:
 * `<?php echo "Difficulty Level: "; echo get_post_meta(get_the_ID(),'_difficulty_level',
   true); ?>`
 * However I have a Multi-Select Field which holds multiple selected values about
   a Dog, such as Playful or Friendly. The meta Key is ‘_temperament_of_dog’. Example
   of the placeholder values: friendly:Friendly |playful : Playful|energentic : 
   Energentic
 * When I use the following code, it returns ‘**Array**‘ on the page rather than
   the actual values. Code:
 * `<?php echo "Temperament of dogs: "; echo get_post_meta(get_the_ID(),'_temperament_of_dog',
   true); ?>`
 * I found some code online which suggests a for loop is needed. Code:
 *     ```
       $temperament = (array) get_post_meta( $post->ID, '_temperament_of_dog', true ); 
       foreach( $temperament as $temp){ echo $temp['value'];} ?>
       ```
   
 * When I use the above code it seems to display the first letter of each selected
   value. So if Playful and Friendly is chosen, it displays as ‘PF’. Also I put [‘
   value’] as I wasn’t sure what this would be and was trying differnt things.
 * Can someone help and explain how to display a multi-select list of values. I 
   have no experience of PHP and find altering code quite tricky without proper 
   guidance to follow.
    Thanks.
    -  This topic was modified 6 years ago by [cono02](https://wordpress.org/support/users/cono02/).

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

 *  [Hitesh Makvana](https://wordpress.org/support/users/hiteshmakvana/)
 * (@hiteshmakvana)
 * [6 years ago](https://wordpress.org/support/topic/display-custom-multi-select-fields/#post-12930261)
 * Hi [@cono02](https://wordpress.org/support/users/cono02/)
 * You are too close to solving there is just one change that will allow you to 
   print the data.
 *     ```
       $temperament = get_post_meta( $post->ID, '_temperament_of_dog', true ); 
       foreach( $temperament as $key => $val){ 
         echo $key; // if you want to print key use this 
         echo $val; // if you want to print value use this
       }
       ```
   
 * Thank you
 *  Thread Starter [cono02](https://wordpress.org/support/users/cono02/)
 * (@cono02)
 * [6 years ago](https://wordpress.org/support/topic/display-custom-multi-select-fields/#post-12934537)
 * Hi Hitesh
 * Amazing! That has worked perfectly.
 * Thank-you very much for your help.
 *  Thread Starter [cono02](https://wordpress.org/support/users/cono02/)
 * (@cono02)
 * [6 years ago](https://wordpress.org/support/topic/display-custom-multi-select-fields/#post-12934764)
 * Hi Hitesh
 * I have another question about the single event listing page. Is it possible to
   edit this page with Elementor? I have edited the event listings page using elementor
   but can’t find a way to do so for a single page. I would like to add a custom
   image behind the header and some other stylings which would be impossible for
   me without a page builder.
 * Thank-you
 *  [Hitesh Makvana](https://wordpress.org/support/users/hiteshmakvana/)
 * (@hiteshmakvana)
 * [6 years ago](https://wordpress.org/support/topic/display-custom-multi-select-fields/#post-12937896)
 * Hi [@cono02](https://wordpress.org/support/users/cono02/)
 * Yes, you can edit page with elementor pro and use dynamic tags to show event 
   fields value at frontend.
 * Thank you
 *  [Priya Goenka](https://wordpress.org/support/users/priyagoenka/)
 * (@priyagoenka)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/display-custom-multi-select-fields/#post-13023514)
 * hi,
 * We hope your issue has been resolved. If you have any other questions in the 
   future, know that we are here to help you.
 * If you don’t mind me asking, could you please leave us a review (if you haven’t
   already) on [https://wordpress.org/support/plugin/wp-event-manager/reviews/](https://wordpress.org/support/plugin/wp-event-manager/reviews/)
   about your overall experience with WP Event Manager? We appreciate your time 
   and patience.
 * If you do have another question in the future, please feel free to create a new
   forum topic, and it will be our pleasure to assist you again.
 * Thank you.
    Team Support.

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

The topic ‘Display custom multi-select fields’ is closed to new replies.

 * ![](https://ps.w.org/wp-event-manager/assets/icon-256x256.png?rev=1622826)
 * [WP Event Manager – Events Calendar, Registrations, Sell Tickets with WooCommerce](https://wordpress.org/plugins/wp-event-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-event-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-event-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-event-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-event-manager/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Priya Goenka](https://wordpress.org/support/users/priyagoenka/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/display-custom-multi-select-fields/#post-13023514)
 * Status: resolved