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)
- Plugin update error message
- echo value from ‘select’ field type into page template using cmb2?
- wp_insert_user – how to send verification email before logging in
- Is the WordPress HTTPS Plugin Still Safe To Use? [closed]
- Set a User as Author of all ‘New Posts’ posted
- Post source link plugin – small modification
- How do you auto-activate plugins from child themes
- What is the function to get plugin base url in multisite?
- Code in theme functions.php faster than with a plugin?
- How to get custom field image url of specific size
- Datepicker not supporting timepicker
- How WordPress autosave can save plugin fields?
- How to remove duplicate Custom Fields?
- Make the checkbox meta field checked by default
- How to get post URL in the_content filter?
- May i Use ShortCode in Template?
- Pass info from functions.php to plugin
- add_query_arg not working
- Advanced Custom Fields plugin – get text from editor field and save it in a variable
- How to Display a Plugin function (content) on frontpage using index.php
- Theme my Login plugin, how to update fields
- Advanced Custom Fields displaying on tag pages
- Custom Fields with Pods not being translated
- get current date + 90 days and checking every day
- Customize permalink wordpress category id
- How to set Noindex to all wordpress pages in a catergory?
- Load Javascript from Plugin in One Page Only?
- URLs Added to ACF Repeater Field are not working
- How to keep variable `$post` to using in another file
- Plugin Development – Functions or Hooks?
- Need to replace Currency Shortforms
- add_query_arg not work in admin
- How do I create a custom permalink structure for a page template
- How to remove a class function from a plugin by using remove_action()?
- Api external with wordpress
- How can ι create my own (custom) WordPress table/list?
- Hook for altering the content of all wp mails
- How to add an extra, independent set of custom fields?
- How to validate custom fields in Quick edit/bulk edit?
- Delete images from media library when user deletes an image from ACF Gallery
- implement custom roles in custom plugin
- How to get current cart values using WC_Shortcodes?
- Register PODS Custom Field with WPGraphQL [closed]
- WordPress default post categories meta box widget
- Fatal error “Call to undefined function is_plugin_active” each time the plugin is activated
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Make modification of add_to_cart button specific to single page
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- how can export data in excel file custom plugin
- WP_CRON issue with UTC and local time
- Custom plugin issue – Notice: Trying to get property of non-object in
- How to wrap image tag into div for post only?
- Update User Meta Via Ajax
- ACF Query result in a new td (echo)
- How can I call functions from a custom plugin?
- Problem with conditional woocommerce custom checkout field
- Unexpected plugin_dir_path Output
- how to repeat taxonomy in different places on wordpress
- Need help getting a certain value out of a multi dimensional array
- Posting code inside the post instead of in the template file using shortcode
- Metabox Data not saving
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Can’t get custom user meta to show in header
- overwrite a plugin function in functions.php
- Pass strings to plugin function [closed]
- How to tweak a plugin without preventing it from updating
- WP Members additional fields on user profile [closed]
- Display Video as Post Thumbnail
- Notifications Bar on home page only
- Make plugin admin page visible to other roles
- wp_enqueue_script doesn’t load JS in plugin
- Order custom post type by posts with most likes first
- Using ACF to allow user to add and edit multiple saved forms