Category Posts repeating after more than 4 posts
-
Hello,
I am working with the Braxton Temple (I’ve created a child theme) and have pages on my website that should display certain posts depending on the category. These pages have a template called latest news. I copies the file page-latest.php into my child theme and have added the following code before the loop:
<?php if( is_page(8)) { ?> <?php query_posts( array( 'category_name' => 'Design' ) ); ?> <?php } ?> <?php if( is_page(9)) { ?> <?php query_posts( array( 'category_name' => 'Exhibition' ) ); ?> <?php } ?> <?php if( is_page(10)) { ?> <?php query_posts( array( 'category_name' => 'Architecture' ) ); ?> <?php } ?> <?php if( is_page(11)) { ?> <?php query_posts( array( 'category_name' => 'Feature' ) ); ?> <?php } ?>
This works for what I need – to put the posts from that category on the page for that category.
The problem I am having is that after I have 4 posts (5 or more) on one of these pages posts 1-5 repeat themselves.
I thought it was a problem with the infinite scroll used in the template but even when I de-activate the infinite scroll the issue persists.
Please help me mitigate this problem!
Here is my url: https://modernmag.wpengine.com
If you go to the Architecture page you can see that there are only 4 posts on there so everything works great. But if you go to the design, exhibitions, features pages you can see the first 5 posts repeating themselves indefinitely.
Thank you in advance!
Dina
- The topic ‘Category Posts repeating after more than 4 posts’ is closed to new replies.