How to change the id name of a custom field

Support General How to change the id name of a custom fieldResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31914
    UlysseUlysse
    Participant

    Hello,
    I created a custom post named "showroom" and a group of custom fields linked with showroom.
    As it was my first custom fields, I named the id fields with generic name like gallery for the gallery of photos.

    Now, I have created other custom posts like "events" or "exhibtions". For them, I have created custom fields id name like "event_gallery" and "exhibition_gallery".

    For my first custom fields, I would like to change the id from "gallery" to "showroom_gallery". How can I do that?
    I tried to change the id name in the group but then the custom fields disappear in the custom post.
    I think I have to update the database but I don't see how to do that.

    Could you help me please?

    #31923
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please follow this topic to know how to rename the custom field in the database https://wordpress.stackexchange.com/questions/31178/how-to-rename-a-custom-field

    #32063
    UlysseUlysse
    Participant

    Thank you for your message.
    I found a more simple and efficient way to do it with a plugin: https://wordpress.org/plugins/edit-custom-fields/

    Step 1 : edit the name with the plugin
    Step 2 : edit the name in metabox and save.

    The plugin can also be helpful to delete useless custom fields.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.