Im looping through some posts in order to get the galleries attached to each post. I would like to collect all urls in another array that will only contain these urls.
<?php if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
if (get_post_gallery()) :
$gallery_images = get_post_gallery_images();
// In each loop $gallery_images will contain a new
// array of urls. I would like to add these urls to collect all urls in another array.
?>
<?php
endif;
}
}?>
Im sure this must be simple but I cant figure it out. Help appreciated. Thank you!