Home › Forums › Add-ons › Repeater Field › Liveticker (take result from first row of event repeater field) › Reply To: Liveticker (take result from first row of event repeater field)
Can you not simply use the first row of the repeater:
<?php $rows = get_field('repeater_field_name' ); // get all the rows $first_row = $rows; // get the first row $first_row_image = $first_row['sub_field_name' ]; // get the sub field value // Note // $first_row_image = 123 (image ID) $image = wp_get_attachment_image_src( $first_row_image, 'full' ); // url = $image; // width = $image; // height = $image; ?> <img src="<?php echo $image; ?>" />
Taken from here: Repeater Documentation
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.