Support

Account

Home Forums General Issues strategy for replacing Text Field with Taxonomy term value selection? Reply To: strategy for replacing Text Field with Taxonomy term value selection?

  • I kind-of agree with the idea of using a different field. My usual method of making changes like this is to.

    1. Create a new field
    2. Create an acf/prepare_field filter that will dynamically set the value of the new field based on the old field whenever a post is edited.
    3. create an acf/save_post action that deletes old field value when a post is updated.
    4. use an acf/prepare_field filter to remove the old field so that it can no longer be edited
    5. Create logic in my template that first looks for a value in the new field, if that exists then use the new field and if a value does not exist then fallback to using the old field.