How to change the output of last item in loop (ACF)

Posted by Pinki | Updated on

If you want to change the output of last item in loop (ACF) You need to count the total fields in the repeater:

then have a field counter to check if the current “counted” field is the last one.

I edited and tested your code and It’s working good:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers