I am trying to make a load more button that will load more images from my ACF Gallery using AJAX. But to do this I need to be able to use wp_query so that I can set the amount of posts per page. So is it possible to convert the following code into a wp_query?
<?php
$images = get_field('images');
if( $images ): ?>
<?php foreach( $images as $image ): ?>
<div class="col-4 p-0">
<a href="<?php echo $image['url']; ?>">
<img src="<?php echo $image['sizes']['gallery_size']; ?>" alt="<?php echo $image['alt']; ?>" />
</a>
</div>
<?php endforeach; ?>
<?php endif; ?>