Support

Account

Home Forums Backend Issues (wp-admin) ACF load_value to Gallery Field Reply To: ACF load_value to Gallery Field

  • This is giving a Warning: json_decode() expects parameter 1 to be string. If I print the result of $slider_data:

    
    Array ( 
      [0] => Array ( 
        [id] => 47 
        [active] => 1 
        [type] => custom 
        [name] => Slider Title 
        [skin] => myCustomSkin 
        [template] => simple_vertical 
        [slides] => [
          {
           "title":"Image 1",
           "image":{"attachment_id":"1653"}
          },
          {
            "title":"Image 2",
            "image":{"attachment_id":"1648"}
          }
        ] 
        [options] => {
          // A whole bunch of options
        } 
        [template_html] =>
          {{image_tag}} {{thumbnail}} {{html}} {{animated_blocks}} {{#link_url}} {{title}} {{/link_url}}
      ) 
    )
    

    Printing $value returns:

    
    Array ( )
    

    I only need what’s in the slides array. Does this change how the array gets traversed?