Sort tags and categories with ACF in WordPress

Start by adding a custom field to your tag or category with Advanced Custom Fields, name it to “custom_field” or something, and add this to your functions.php.

 

Modify the tag or category object in the loop by getting the custom field, but it back, sort it and use it how you want.

 

Leave a Comment