Thanks for getting back to me! I can’t seem to get this to work. I currently have this in my repeater – as I want to pull in the entire post.
<div class=”col-12 post-repeater”>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
and have placed this short code into my single.php template
<?php echo do_shortcode( ‘ [ajax_load_more id=”2876571844″ container_type=”div” post_type=”post” posts_per_page=”1″ category=”booze,culture,eats,faces,whats-happening”] ‘); ?>
So in order to add the post__not_in where do I add the code sample? As even if I add all of the sample code to the template it doesn’t work, I still get duplicates of the original post the load more follows.
All you need to pass the post IDs you want to exclude from your Ajax Load More query to the post__not_in shortcode parameter.
global $post;
$id = $post->ID;
echo do_shortcode('[ajax_load_more post__not_in="'. $id .'"]');
Hope that helps.