Prevent Duplicate Post Counted by Query
?php
while ( have_posts() ) : the_post();
$get_series_id = get_post_meta( get_the_ID(), 'series_seri', true );
if (in_array($get_series_id, $do_not_duplicate)) {
continue; // We've already seen this post ID, so skip the rest of the loop
}
$do_not_duplicate[] = $get_series_id;
?
?php the_title(); ?
?php endwhile; wp_reset_postdata(); ?
how to make duplicate post not counted ? i wanna show 20 post, but in frontpage only showing 5 post because duplicate post also counted,
Topic duplicates post-duplication loop wp-query Wordpress
Category Web