I can only see achieving this by first building an array, then looping over it – I can’t find anything in APC’s docs about checking if it’s the last iteration of the_repeater_field
:
$images = array();
while ( the_repeater_field( 'homepage_service' ) )
$images[] = get_sub_field( 'service_image' );
if ( $images ) {
$image_last = array_pop( $images );
echo '<ul id="servicelist" class="clearfix">';
if ( $images )
echo '<li>' . implode( '</li><li>', $images ) . '</li>';
echo '<li class="last-child">' . $image_last . '</li>';
echo '</ul>';
}
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Generate Advanced Custom Fields box in custom admin menu page
- Edit Imported advanced Custom Fields from wordpress Dashboard
- Advanced Custom Fields query
- How to create Repeater fields using Advanced Custom Fields?
- Last modified field for user profile?
- Inserting HTML tag with ACF into shortcode
- Using a post-signup hook to get user details
- is there a way to link one of the field in ACF field group, to a field in a media attachment page? [closed]
- How to create an input field, and base the output on spreadsheet data? [closed]
- WordPress metaboxes – textfield suggestion automatically populated
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- WordPress function to add text warning on every pages [closed]
- grab or load text on demand
- Advanced Custom Fields Plugin – Images not displaying
- How to create repeater field manually, without plugin (ACF Pro)?
- What snippet do I need to type to show my ACF field show up on my theme?
- Replace the_content with ACF Flexible Content via function
- Create a pdf from the entries in DB
- custom fields not displaying on wordpress site
- ACF Fields are not showing up on Homepage
- Why Custom fields description is not working WordPress Version 5.4.2?
- How do I change the functionality of an image slider which is part of ACF?
- Get a Taxonomy values in an array
- ACF: Hide a div or template section when a custom field (in a field group) is empty
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- Sort posts by Date (DESC) and by ACF: active_inactive (ASC)
- How to translate wordpress error message
- dynamic name of the style for wp_enqueue_style
- Api external with wordpress
- strange shortcode error: does shortcodes requires any dependency?
- All custom widgets are not showing in widget area at the same time
- How can ι create my own (custom) WordPress table/list?
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- How do I convert my WordPress website to be domain agnostic?
- Change Header (Logo) Based on Login
- How to access OOP plugin function inside themes or other plugin
- how to change wp-admin url using function file
- Add the_post_thumbnail_url to a shortcode in function.php
- Custom post type in Custom widget – $listItem
- ACF – How to set the menu order for the relationship field
- Custom post types, disable fields
- Add action to custom Function
- Hook for altering the content of all wp mails
- Show media-uploads to all users
- same user role or copy the user role to be same as the other role
- Conditional custom redirect
- How to get rid of Ellipsis on Woocommerce [Essential] Theme [closed]
- Sharing functions between plugins
- How to add an extra, independent set of custom fields?
- Price comparison table based on Custom Post Type?
- Preview with Custom Post Type Not Working
- Show related posts based of current ACF field name in a single page post (a loop within loop)
- Help with a function in a widget
- How can I store data from custom fields to custom tables?
- Changing plugin options from theme functions file?
- How to display a number of posts based on a Advanced Custom Field (ACF)
- Translation to ACF relationship field
- Expected ‘add_filter’ (T_STRING)
- Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]
- Could not add ‘LoginLogout’ link using BAW login logout plugin
- My widget won’t update its values when save is clicked
- Execute a function when the entire page is displayed
- How to get the get the select values created by ACF plugin in wordpress
- Advanced custom fields and Slideshow gallery desn’t work together? [closed]
- Perform function on publish AND save (not just save)
- Different registration form for different roles
- Excerpt length: get first paragraph
- how can authors to define custom pages?
- How can i listing current category and Featured Category post list?
- How can i list random author?
- Custom Fields for Page Edits
- Adding a Tag Parameter / Filter to My Shortcode
- More gentle way to hook WordPress custom url
- Call javascript functions from each page
- “After file loaded” action
- Add_image_size not generating correct size
- Plugin that lets visitors Like a post (not facebook) and stores likes in custom meta?
- How to add custom function to pluggable.php
- Adding a pagenavi to function for displaying bookmarks
- Parent Child Custom Fields with Advanced Custom Fields
- How can I add user profile fields to my mailpress mailout
- Dictionary-style definition list plugin
- Can you echo PHP code from a variable?
- Removing the custom_image_header from wp_head
- How do I create pages within a WordPress post?
- Adding custom Field To The Posts Listing
- Listing all sidebars
- sliding/fading header plugin or approach suggestion
- What is the most efficient way of adding additional functionaliy for admin only
- Defining the value of a variable before a function?
- auto activate plugin when theme is active
- Elementor Pro display featured image on section -> style -> image using shortcode
- How to get custom minimum price in Woocommerce
- Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- How to validate custom fields in Quick edit/bulk edit?
- How can i call a functions.php function, from inside my plugin class?
- Build a must-use plugin that tracks when other plugins are activated or deactivated