Support

Account

Home Forums General Issues Many of the same clone in another set of fields Reply To: Many of the same clone in another set of fields

  • I tried to follow the suggestion posted by John in https://support.advancedcustomfields.com/forums/topic/many-of-the-same-clone-in-another-set-of-fields/#post-129384 so:

    1. I have a “Testimonials” group with 2 fields inside that I use only as a “source” to clone where needed
    2. In another page I have 2 groups, “Testimonials” and “Testimonials 2”.
      Inside each of those groups I cloned the “Testimonials” group mentioned in #1, with Display set to Seamless
    3. The values are correctly saved but if I try to print them with the following code, the_row() returns false and “title” is never printed
      if (have_rows('testimonials')) {
      	while (have_rows('testimonials')) {
      	    the_row();
      	    echo get_sub_field('title');
      	}
      }
      

    However if I use this code
    $testimonials = get_field( 'testimonials' );
    all values are inside $testimonials[‘testimonials’]

    Clearly I’m missing something…any clues?