Support

Account

Home Forums Feature Requests ACF SYNC improvement

Solving

ACF SYNC improvement

  • Is it possible to add the function to the json sync to improve the sync like this:

    START
    Site 1 fields (master)
    – A Fields

    Site 2 fields (1st import from master)
    – A Fields

    Step 1
    Site 1 fields (added new fields)
    – A fields
    – A1 fields
    – C Fields
    – D Fields

    Site 2 fields (added new field)
    – A Fields
    – A2 field
    – B Fields

    Step 2 – Sync site 1 fields to site 2
    Site 1 fields (stay the same)
    – A fields
    – A1 field
    – C Fields
    – D Fields

    Site 2 fields (has all the master fields + it’s own ones)
    – A Fields
    – A1 field
    – A2 field
    – B Fields
    – C fields
    – D fields

    I think this would be more of a sync, since as i tested now it just overwrites/deletes fields with the .json file.

    I think this would be nice if you had more sites where each of them has some specific/unique flexible fields etc. And you would always make changes to the master one and roll out those changes to other sites without losing/deleting anything.

  • Hi @darisi

    While this is a good thought it wouldn’t be wise to implement this for one reason; Not everyone uses WPMU as master site > sub sites. Many uses it as just a network where the main site doesn’t really have that kind of connection/sync to the others.

    HOWEVER, I think a tweak of this could be a great idea. The ACF JSON files could be inherited by a childtheme from the parent theme. That way you’d be able to use it if you like and it follows the WordPress way of inheritance by childthemes. It would however require some way to be able to override that a field group shouldn’t be inherited or deleted for the childthemes.

    Does that sound good to you?

  • Hi @jonathan, i was thinking more of a checkbox with the sync options (i still want to delete/readd fields on some other fields) :).

    In my case i don’t want to use WPMU, it’s just that i have many websites to manage/create and want to have my own flexible content fields, which are made into bootstrapped modules (like the drag & drop ones work).

    But updating them to each site would be great, but some of those sites require either some custom flexible content fields or something else added (based on content/product etc.) and those would get overwritten with the sync (the problem is that i can’t create 2 different flexible module groups that have the drag& drop ordering feature etc.). The master was just a name for the most updated custom fields.

    So in the end i would be able to keep the ACF and templates clean throughout the site and update just by copy/pasting the files and syncing the changes. I did stumpble on this improvement when trying to figure out one of my problems here. 🙂

    The child theme approach seems interesting but in my case it may make everything more complex as i use the roots.io starter theme.

    I think that one solution to this workflow would be to create a plugin with all the acf fields etc inside it, but i haven’t been able to do that with my limited php skills.

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

The topic ‘ACF SYNC improvement’ is closed to new replies.