ACF text field – has some info – standard ways to access this are
get_post_meta( $post->ID, ‘text_field’, true );
get_field( ‘text_field, $post-ID );
or as of WP 3.5
And this – $post->text_field is so clean. It seems to work great for text, text area, WYSIWYG and even checkboxes ( which are serialized data, so we get a multi dimentional array returned from $post->example_checkboxes ). But for a repeater field, we just get the count. $post->repeater_field // 2, or 3, however many rows we have in it.
Anyone know a way around this? I tired $post->repeater[‘subfield’] but no luck.
The repeater field saves all it’s data in the wp_postmeta table. If your repeater field is called “gallery” and contains 2 sub fields called “image” and “description”, this would be the database structure of 2 rows of data:
// meta_key meta_value
gallery 2 // number of rows
gallery_0_image 6 // sub field value
gallery_0_description "some text" // sub field value
gallery_1_image 7 // sub field value
gallery_1_description "some text" // sub field value
$post->repeater_0_subfield //for first row
$post->repeater_1_subfield //for second row