Support

Account

Home Forums ACF PRO Outputting select field values with totals

Unread

Outputting select field values with totals

  • Is it possible to output the options from a select list whilst also counting how many posts have that option selected?

    For example, let’s say you have a select list with options:

    Orange
    Apple
    Melon
    Grape

    We want to output a list that shows something like this:

    Orange – 2
    Apple – 6
    Melon – 7
    Grape – 0

    Taking this one step further is it also possible to sort the output by the counts, so the above would be:

    Melon – 7
    Apple – 6
    Orange – 2
    Grape – 0

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.