2

How to use max and min values of custom fields (created via ACF, repeater type)?

For axample, I've custom post type 'auto' and there are a lot of models. Each post(model) has few values of price (from different salon). These fields for price created via ACF, repeater type.

Also, I've page to display all of them via loop and into sidebar of this page I'd like to show max and min price of auto.

As I think the best way to do this, declare global array (I guess in functions.php) and go across all posts and get price values into global array. Is that way is right or maybe there is some easiest way to do this.

Curretly I've did it via creating array into standart loop and add all values to it. But there are added only values from first page, instead of all.

  • 1
    ACF has pretty thorough documentation - advancedcustomfields.com/resources - as well as support for their particular plugin. You'll likely find more resources on their site. :) – WebElaine Sep 21 '17 at 14:27
  • I've tried to find answer there, but unsuccesful. – Влад Sep 21 '17 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.