Support

Account

Home Forums ACF PRO WP_Query repeater field minimum value Reply To: WP_Query repeater field minimum value

  • Dear Colleagues,

    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

    property 1:
    station1 – 3 minutes
    station2 – 5 minutes

    property 2:
    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.