Duplicate Posts Returned
-
I’m using this plugin extensively across a site, and in most cases, it is working great. But on a specific page template, it is returning multiple instances of the same post, and not returning other posts.
Here is my shortcode, that is appearing outside the Loop in a custom page template:
[ajax_load_more container_type="div" css_classes="people-list-holder" repeater="template_1" post_type="qd_people" posts_per_page="16" orderby="menu_order" scroll="false" button_label="Load More" button_loading_label="Loading People..."]And here is “template 1”:
<div class="singlePerson"> <a href="<?php echo get_permalink(); ?>"> <?php $headshot = get_field('qd_ppl_headshot'); ?> <?php if($headshot){ ?> <img src="<?php echo $headshot['sizes']['square-img']; ?>" alt="<?php echo $headshot['alt']; ?>" /> <?php }else{ echo '<div class="noImage"></div>'; } ?> <div class="personText"> <div class="personName"><?php the_title(); ?></div> <?php $jobTitle = get_field('qd_ppl_job_title'); if($jobTitle){ echo '<div class="personTitle">'.$jobTitle.'</div>'; } ?> </div> </a> </div>These posts were imported in from an existing WordPress site. I thought that might have something to do with it, but the other post types that are working are not experiencing this same problem.
The topic ‘Duplicate Posts Returned’ is closed to new replies.