ACF has a function called get_row_index()
that you can utilize. Here is how you can possibly use it in your case
<?php
$active="active";
while ( have_rows('images') ) : the_row();
$image = get_sub_field('image');
if(get_row_index() == '1' ):
?>
<img src="<?php echo get_template_directory_uri(); ?>/files/images/<?
php the_sub_field('image'); ?>" class="img-fluid is-slider-item" />
break;
<?php $active="";
endwhile;
?>
<?php endif; ?>
Notice I checked to see if the row index was 1 (the first row) then displayed what was needed within that logic.
Hope this helps!
Related Posts:
- Bootstrap 4 Carosuel with ACF Repeater field
- How to use nonce with front end submission form?
- Display all values of custom a field created with ACF on a page
- Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- WordPress as a backend only. How to output database content on public side without WordPress?
- If Custom Field is empty don’t display div
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Conditional statement for parent, child and grandchild pages
- The values of custom fields are not available functions.php
- Problem with ACF shortcode with Repeater Field in WordPress? [closed]
- Unique key for each row in a repeater field
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- Advanced Custom Fields Image Field returning ID instead of URL [closed]
- Uploading video to google drive via frontend [closed]
- Can an array be used as a meta_query value?
- How to attach a uploaded video to post from front end
- Download PDF after CF7 form submission
- How to create an ACF shortcode with Repeater Field in WordPress? [duplicate]
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- Upload non-featured image to image field
- HTML Special Characters in URL string [closed]
- ACF put a comma after the last repeater field value [closed]
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- Form search query – displaying ACF “Post Object” field as results
- InnerBlocks with allowedBlocks not working with acf_register_block
- Accessing values from ACF sub field (flexible content area) in PHP
- Creating an image from a custom field
- Can I set up a hover animation in CSS depending on a PHP conditional?
- Get ACF options field in PHP acting as CSS
- ACF & Bootstrap Gallery Shows Blank Slides [closed]
- Conditional multidimensional arrays and array_map
- ACF Repeater Pagination stopped working since upgrade to php7.2
- How can I count ACF sub_field with a certain value
- what is the method to echo class attribute inside the i tag? [closed]
- Refactoring long if/else php chains
- Getting taxonomy category Image from ACF [closed]
- create front-end users post list by specific category
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Show get_sub_field value if it exists [closed]
- Update post meta – Custom field does not match meta-key
- Advanced Custom Fields [closed]
- ACF Unexpected T_CONSTANT_ENCAPSED_STRING [closed]
- Including Custom fields within the_content
- Get All In One SEO Pack to use custom field instead of Content
- Remove Post if Advanced Custom Field is checked to fix paging
- Wp_editor doesn’t send the required data
- Plugin: Front-end Editor – User role specific editable content?
- Update user repeater meta (ACF) with another user meta field value
- Display Post Title From Select Choice Loop in Advanced Custom Fields (ACF) – WordPress
- Add class to all img if they have a certain ACF field
- Foreach loop is unexpectedly outputting an extra empty a tag
- Delete images from media library when user deletes an image from ACF Gallery
- How to store checkbox data for individual users?
- Problems updating nested ACF field groups
- Display acf taxonomy attachment
- Nested Queries of decreasing specificity
- Get main parent category for post (WordPress/Advanced Custom Fields)
- Creating plugin with front-end pages
- ACF: Display Google Map in frontend issues
- How to display acf field values from home page on all pages?
- ACF Taxonomy field values not select in backend
- Set ACF on order during checkout
- If Statement is Ignored?
- Use WPQuery to match to specific repeater row in post
- Query on a repeater date (acf)
- ACF values to Script with auto refresh
- ACF relationship on user profile page used for allowed access
- ACF – Can’t get custom post type by taxonomy
- Advance custom fields variable with if statement & Function
- ElseIf Statement with ACF Group field
- Advanced Custom Forms PHP formatting for do_shortcode
- Possible to edit custom date field and display?
- Get field value and use as variable in php
- Place product field value as variable in php
- ACF Gallery field images donwload
- ACF – Get ID of relationship field in flexible content
- ACF under category name in shop page [closed]
- get_template_part() not working with Advanced Custom Fields plugin
- List all ACF field values across every post on one page
- Get list of posts from attachment
- Javascript Tab Gallery with Advanced Custom Fields
- How to output values from a loop into a javascript array
- Pulling Products from an API
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- ACF background-color per post in a WordPress loop
- How can I copy an ACF field to AIOSEO field? [closed]
- Scheduling a post using publish date from a custom field. Resulting post is set as published in the future instead of scheduled
- HELP! Frontend User Profile Edit Won’t Update Email
- Make sticky post with FacetWP
- Generate a radius search of custom post type locations
- WooCommerce Custom Tab with ACF Repeater Field
- Ordering / grouping posts by datepicker ACF
- PHP for loop not working as intended
- Position a repeated article blocks
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- Display a single row from nested array of custom field data
- Else if Statement for Advanced Custom Fields [closed]
- ACF Images If/else