Support

Account

Home Forums Add-ons Gallery Field Import existing gallery fields

Solving

Import existing gallery fields

  • I am migrating from CCTM to ACF Pro on one of our sites. We have products as CPT and have gallery fields attached to them. We’d like to paste over or import database fields for those galleries. Pasting over manually is still an option, as we dont have that many items yet. Thing is: there’s no html mode for gallery fields, nor do we now what these fields look like in the database. Please advise, thanks.

  • What is CCMT?

    I’m assuming that this allows you to add HTML in some way?

    ACF stores the attachment ID values in an array in the postmeta field in the DB, so there’s not HTML involved.

  • CCTM a solution for creating custom post types and filters.

    I’ll have a look into your remarks, as that involves some more resarch on my end.

  • It’s a good thing you don’t have many of them because I don’t know any way to import something that’s in HTML into ACF, unless you wanted to import them into a WYSIWYG editor and I think that might defeat your purpose.

  • Well, it’s not in HTML but in database. All the more puzzling that ACF does not pick up on it, as the term for the field is identical.

  • ACF will pick up on it if 1) the data in the database is the same and this needs to be a serialized array 2) the meta_key value is the same and 3) the acf field key entry exists in the database for the post.

    Let’s say the field name is “gallery” the database must have to entries for the post:

    
    post_id    meta_key    meta_value
    100        gallery     {SERIALIZED ARRAY}
    100        _gallery   field_123456789abcd
    
Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Import existing gallery fields’ is closed to new replies.