Support

Account

Home Forums Add-ons Gallery Field update gallery information on database with image IDs ONLY

Solving

update gallery information on database with image IDs ONLY

  • Hi,

    I am currently trying to update the PHP files so that on post update, my SQL meta_value for gallery just shows a list of image IDs. We are looking to call these IDs with an app and the additional information in the meta_value is not necessary.

    What code should I add or remove to accomplish this and are there any issues with trying to achieve this?

    Thanks,

    David

  • ACf actually only stores the IDs of the images in the gallery. The other information is added based on what you have the gallery field return. To get just the array of IDs add the third parameter in get field

    
    get_field('field_name', false, false);
    

    See “Get Value Without Formatting” on this page: http://www.advancedcustomfields.com/resources/get_field/

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

The topic ‘update gallery information on database with image IDs ONLY’ is closed to new replies.