Home › Forums › ACF PRO › WP_Query repeater field minimum value › Reply To: WP_Query repeater field minimum value
I came across the neccessity of the same feature.
I’ve Property CPT which has a repeater field Proximity2Metro. Inside that repeater are subfields Minutes and Station. Minutes field contains how much minutes does it take to get to/from the corresponding metro station to/from the property.
Let’s say I’ve the following
station1 – 3 minutes
station2 – 5 minutes
station3 – 4 minutes
station4 – 6 minutes
Then I need to filter properties by the minimum number of minutes. For example, I need all the properties with no more than 3 minutes from metro.
For now I have to add filtering inside while-have-posts loop, which is not very efficient. It should be accomplished via wp_query args.
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!
Plugin boilerplates can do some of the heavy lifting during initial development. We look at four options to speed up your plugin creation. https://t.co/ZtMsdBxAHw— Advanced Custom Fields (@wp_acf) June 5, 2023
© 2023 Advanced Custom Fields.