Home Forums General Issues Best practice for naming the fields Reply To: Best practice for naming the fields

  • just using author and year will give you problems because these are “reserverd” words in WP. They’ll cause conflicts.

    Besides worrying about any problems with WP as mentioned above, you really can’t have fields with the same name attached to the same post type or you’ll run into problems there as well. They tend to overwrite each other. Basically, every field you create, with the exception of sub fields in repeaters and flexible content, need to be unique.

    I would not change the names of the fields if they already have data in them, actual field name does not matter…

    unless you’re using the field name to do more than just display data, for example converting them to labels on the front end or something. I that’s the case then I’d go into the database using phpMyAdmin and to a query to replace all the old field name values with new ones, and you need to remember to rename the special ACF names as well.

    for every $my_field_name there is also a '_'.$my_field_name to worry about.