I have a custom post type called videos and on my home page I want to display three posts at a time with a "load more" button below that when clicked will load the next 12 posts directly below. My code in my front-page.php is:
<?php
$args2 = array(
'post_type' => 'videos',
'posts_per_page' => '3',
'offset' => '1'
);
?>
<div class="triple site-content">
<h1>Featured Issues</h1>
<?php $query = new WP_query ( $args2 );
if ( $query->have_posts() ) { ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="col-sm-4" id="<?php echo( basename(get_permalink()) ); ?>">
<?php global $post;
$gethref = $post->post_name; ?>
<a href="/<?php echo $gethref ?>"><img
src="https://img.youtube.com/vi/<?php the_field('video_id'); ?
>/hqdefault.jpg" alt="<?php the_title(); ?>" class="stills"/></a>
<span class="subTitles"><?php the_title(); ?></span>
</div>
<?php endwhile; } ?>
I'm not sure how to go about tackling this issue. I have tried a few options I've researched online but nothing is seeming to work.