Support

Account

Home Forums General Issues Trying to ORDER foreach loop by ACF field Reply To: Trying to ORDER foreach loop by ACF field

  • What would you suggest then? To clarify.

    I have a CPT “Termek”

    This CPT has a Category (also called / sorry for the confusion) of “Termek” which has 5 children

    – Termek 1
    – Termek 2
    – Termek 3
    – Termek 4
    – Termek 5

    I would like to order these based on the $number field so that if say “Termek 5” has an ACF field of $number with the value of 3, it will show up third in the foreach statement. Am I going about this in the wrong way?

    Thanks!