Title: Repeatable Groups
Last modified: August 24, 2016

---

# Repeatable Groups

 *  Resolved [andp](https://wordpress.org/support/users/andp/)
 * (@andp)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/repeatable-groups/)
 * Hello
 * I know i can insert repeatable fields inside a repeatable group, but i was wondering
   if there is way to insert a repeatable group inside another repeatable group.
 * thank you
 * [https://wordpress.org/plugins/cmb2/](https://wordpress.org/plugins/cmb2/)

Viewing 2 replies - 16 through 17 (of 17 total)

[←](https://wordpress.org/support/topic/repeatable-groups/?output_format=md) [1](https://wordpress.org/support/topic/repeatable-groups/?output_format=md)
2

 *  Thread Starter [andp](https://wordpress.org/support/users/andp/)
 * (@andp)
 * [11 years ago](https://wordpress.org/support/topic/repeatable-groups/page/2/#post-6033066)
 * Repeatable Groups are great but i m facing some difficulties. using cmb2 i managed
   to create the desired custom meta fields for my user and my custom post type.
 * using
    echo get_post_meta(get_the_ID(), ‘submitted_note’, true); i am able to
   display the value of my custom field on the front-end.
 * i am straggling though to do this with me repeatable group values.
 * in my db i have something like this
    a:1:{i:0;a:6:{s:25:”submitted_hotel_name”;
   s:14:”hotel one”;s:28:”submitted_hotel_acronym”;s:6:”depone”;s:28:”submitted_hotel_address”;
   s:4:”fdsd”;s:29:”submitted_hotel_postcode”;s:5:”sdfsd”;s:25:”submitted_hotel_city”;
   s:6:”sdfsdf”;s:28:”submitted_hotel_country”;s:6:”sdfsdf”;}}
 * can u give me a quick hint of how to display a single value i.e submitted_hotel_postcode
   only.
 * thank u
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [11 years ago](https://wordpress.org/support/topic/repeatable-groups/page/2/#post-6033067)
 * What you’re essentially seeing in that db value above is an array of repeatable
   groups. The group itself is an array, and it’s stored in an array with other 
   group items, even if you only have 1 group at the moment.
 * If you need to display them all, then you’re going to want to go with a foreach
   loop on the get_post_meta variable and in the loop, echo the different parts.
 * If you’re needing to echo out parts of a specific group, it’s going to get more“
   interesting” because you need to find a way to isolate that group within the 
   array of groups, and that’s not always easy. The immediate example that comes
   to my mind is a foreach loop still, and inside that, a bunch of conditional checking
   and echo’ing.

Viewing 2 replies - 16 through 17 (of 17 total)

[←](https://wordpress.org/support/topic/repeatable-groups/?output_format=md) [1](https://wordpress.org/support/topic/repeatable-groups/?output_format=md)
2

The topic ‘Repeatable Groups’ is closed to new replies.

 * ![](https://ps.w.org/cmb2/assets/icon.svg?rev=2866672)
 * [CMB2](https://wordpress.org/plugins/cmb2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cmb2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cmb2/)
 * [Active Topics](https://wordpress.org/support/plugin/cmb2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cmb2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cmb2/reviews/)

 * 17 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/repeatable-groups/page/2/#post-6033067)
 * Status: resolved