Home › Forums › Add-ons › Repeater Field › Optimize WP_query (repeater) › Reply To: Optimize WP_query (repeater)
The best way to optimize the queries it do get all of the meta data in a single query rather then getting the specific repeater fields. using
$all_field = get_fields($post_id);
This causes a single query to be done that loads all of the values to be retrieved and cached and it is faster than getting the repeater because getting just the repeater causes multiple queries to be done. It causes ACF to loop over each row of the repeater an does a separate query for each sub field of each row.
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.