Support

Account

Home Forums Backend Issues (wp-admin) Moving fields from one group to another

Solved

Moving fields from one group to another

  • Dear you,

    is there a way to move a field from one field group to another field group?

    Creating the same field (name) within a second field group after deleting the field in the first group seems to do the trick in the backend, but the values aren’t available in the frontend, the field values are empty.

    After opening and saving a post/page/whatever the value is available in the frontend. Nice enough for smaller numbers …

    So: What’s “best practice” to move a field?

    Thanks
    Thomas

  • What version of ACF are you using?

  • ACF 4.4.7 on WP 4.5.3

  • So that you know, ACF5 with is only available as a Premium plugin http://www.advancedcustomfields.com/pro has a feature that will let you move fields.

    The problem with the way you moved the fields is that the field key has been changed even though you’ve used the same field name.

    There are two ways that you can fix this.

    The first is to go into the database for your site and do a search for _your_field_name, note the _ added before the field name. This entry in the database contains the field key pointer. What you need to do is find all of the rows with the wrong field key and replace it with the new field key.

    The second method would be to export your field group as an XML file. Edit the XML file to replace the new field key with the old field key. Delete your field group in the admin and then use the standard WP import tool to import the field group with the changes back into WP.

  • Thanks for all the three ways to solve the problem, I was aware of the field key, but fiddling the database isn’t my favourite cup of tea, so the xml-export/-import is a more appropriate way and purchasing the pro version might be the best suggestion of all three 😉

    Yours,
    Thomas

  • Sorry about the wrong button … John solved the problem …

  • For ACF4, the best way that I can think of to move a field would be be to export both field groups as XML files. Cut the field you want to more from one groups, past it into the other, then delete and re-import both groups. It’s a bit of work, but as you say, messing about in the database is not for everyone.

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

The topic ‘Moving fields from one group to another’ is closed to new replies.