1

On my blog, for some reason, one of the category pages refuses to load new posts even when I clear all my caches. I'm using WP Super Cache (W3 Total Cache broke my site), Autoptimize and Cloudflare for caching.

I doubt the code is the problem since the other category pages are working just fine.

$query= new WP_Query(array(
    'offset' => 1,        
    'cat' => $cat_ID      
));

 if ( $query->have_posts() ) while ( $query->have_posts() ) : $query->the_post();

 get_template_part('content', get_post_format()); // loaded from content.php

 endwhile;

What could be the cause of this?

closed as off-topic by Michael, Dave Romsey, cjbj, EAMann Feb 9 '17 at 22:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Michael, Dave Romsey, EAMann
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I was determined to upvote this question the very first moment I saw it. – prosti Feb 7 '17 at 23:08
  • If you open your page from incognito browser window what you get? – prosti Feb 7 '17 at 23:09
  • Does it show any posts at all on that category page? If so, how many posts is it missing at the start? Trying to understand what you mean by load "new" posts... – Industrial Themes Feb 8 '17 at 14:30
0

A shot in the dark honestly, but the offset may be causing it to not read that category in the category array. Maybe try turning the offset value to 0 (possibly even -1). Hope that helps. Good Luck.

EDIT: Also was able to find this with some information on the offset parameter:

https://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters

0

Remove 'offset' from query argument.

Not the answer you're looking for? Browse other questions tagged or ask your own question.