Support

Account

Home Forums ACF PRO ACF Taxonomy – Load terms in order they are entered?

Helping

ACF Taxonomy – Load terms in order they are entered?

  • Right now, when you enable “Load Terms” for acf taxonomy field, it will automatically load all terms from that specific taxonomy into acf’s taxonomy field. I love this feature, but it orders the terms by term_id. When you manually select terms, they are displayed in the order you selected. Is there a way to “load terms” into acf’s taxonomy field in order they are entered in the default wp taxonomy field?

  • I do not think that there is any way to do this. With load terms on ACF gets the terms in the order that WP returns them in the order WP orders them. With Save terms on nothing is saved that would tell you what order they are in.

    I don’t know if this will work. What I would try is to not use not use the ACF save and load terms feature and instead create my own filters that would do the loading and saving of terms (get_terms and set_terms). If you do this then the value returned by ACF will be in the order that the terms were selected and you may be able to use this to somehow order the terms. With save terms/load terms off ACF saves an array of term IDs in the DB in the order selected. With them on this value is not saved or loaded and any call to get_field() ignores the value in the DB even if it is there.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.