Home › Forums › Add-ons › Repeater Field › Repeater field doesn't work with Flexslider › Reply To: Repeater field doesn't work with Flexslider
Hi @jeffelizaga
That’s because WP_Query will return not only the posts but also other things related to the query. You can debug the $team
variable if you want. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/debug/.
I believe you can get the total posts count by using this code:
$max_li = $team->post_count;
Please learn more about WP_Query here: https://codex.wordpress.org/Class_Reference/WP_Query.
I hope this helps.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.