How to insert multiple images
-
Hi,
I have two File/Image/Video fields. One is for just one image and the other is for multiple images.
The code is like this:
$pod = pods( 'event' ); $data = array( 'name' => 'Event Name', 'author' => 1, 'primary_image' => 'site.com/image1.jpeg', 'gallery' => [ 'site.com/image2.jpeg', 'site.com/image3.jpeg' ] ); $new_id = $pod->add( $data ); echo $new_id;
The primary_image was added but not the gallery. What’s the code to add multiple images? I can’t find it in the docs.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to insert multiple images’ is closed to new replies.