Title: [Plugin: Custom Fields Creator] Accessing repeated custom fields
Last modified: August 20, 2016

---

# [Plugin: Custom Fields Creator] Accessing repeated custom fields

 *  [yoxalld](https://wordpress.org/support/users/yoxalld/)
 * (@yoxalld)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-fields-creator-accessing-repeated-custom-fields/)
 * Hi, first off, great job with WCK, they make adding custom post types and custom
   fields really easy!
 * I have created a custom field box for specials. For each special you have: type
   of special, name of special, price, and day of the week.
 * What I need to do is check to see if there is a special of a certain type (Drink)
   and if there is echo the other info for the special. But I can’t seem to figure
   out how to access the next dimensional array to check each key value pair. I 
   am not great at dealing with multidimensional arrays apparently.
 * Here is what I have so far:
 *     ```
       $args = array(
       	'post_type' => 'business',
       	'meta_key' => 'specials'
       	);
       $loop = new WP_Query( $args );
       while ( $loop->have_posts() ) : $loop->the_post(); 
   
       $specials = get_post_meta( $post->ID, 'specials');
       	foreach( $specials as $special){
       		if ($special ['type-of-special'] == 'Drink' ) {
   
       			echo $special ['name-of-special'];
       		}
   
       	} 
   
       endwhile;
       ```
   
 * I created the custom post type of business and added the custom fields to that
   post type. Any help would be greatly appreciated! Let me know if you need any
   other information from me. Thanks!
 * [http://wordpress.org/extend/plugins/custom-fields-creator/](http://wordpress.org/extend/plugins/custom-fields-creator/)

The topic ‘[Plugin: Custom Fields Creator] Accessing repeated custom fields’ is 
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-fields-creator.svg)
 * [Custom Fields Creator](https://wordpress.org/plugins/custom-fields-creator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-fields-creator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-fields-creator/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-fields-creator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-fields-creator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-fields-creator/reviews/)

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [yoxalld](https://wordpress.org/support/users/yoxalld/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-fields-creator-accessing-repeated-custom-fields/)
 * Status: not resolved