Support

Account

Home Forums Add-ons Gallery Field Gallery field not saving when added from PHP

Solved

Gallery field not saving when added from PHP

  • If I create a gallery field from the ACF plugin within wordpress, everything works fine. If I then use the ACF export to export the fields PHP code the field will not save. The metabox shows up ok and I can then select the items I want in the gallery and they show in the create/edit post page properly. Once I hit “update” on the post the gallery field loses the selected posts. Once again, it only is happening for a gallery field that is created using

    
    if(function_exists("register_field_group"))
    {
    	register_field_group(array (
    		'id' => 'acf_gallery', 

  • Found out my problem a few min after posting. Forgot that I was removing the field key when in the PHP creation of the field. Added that in and it worked ok.

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

The topic ‘Gallery field not saving when added from PHP’ is closed to new replies.