Blog looper consumer skips post

I’m using one single archive layout for my blog. The looper consumer consistently shows one post fewer than is specified. It’s currently set to nine posts while only displaying eight posts, thus every ninth post isn’t displayed in the blog layout.

I encountered the blog skipping a post when using the Postmodern Pixel template, but this layout is the same for all pages (there’s no hero section).

Similarly, I’ve got another blog that skips five posts between page one and two. That also uses the same layout for every blog page. For each site, the reading settings are set to show more posts than the looper is set to display.

Clearly, I’m doing something wrong, but I can’t figure out what. The two sites that I’ve mentioned both use the grid to display posts.

Hi @WaggingLabs,

Thanks for reaching out.
I have checked the Archive Layout and found that the Condition has been set for a specific term named Podcast. And that is why it is not selecting those posts having the term.

Thanks

Hi @tristup,

Yes, it’s true there is a condition set to the blog and that’s intentional.

I created a spreadsheet that accounts for the podcast category, their order of appearance, and the posts that are skipped. You’ll also see that blog pages one and two only display eight posts while page three displays nine posts.

I look forward to your findings.

Thanks!

Hi @WaggingLabs,

I have checked and found two posts are coming on page 1 and page 3. And another post is in draft, so it will not come until published.

Thanks

@tristup I see you changed my looper from showing many (nine posts) to showing all items.

I also see that I mistakenly included a draft post and I understand that it won’t appear on the front end. I’ve corrected my spreadsheet.

I’m looking for clarity on this item and have created a screen capture showing the results I see when setting the looper to all posts versus many posts.

I prefer to have eight posts max per page (I don’t want to display all items). I also want to keep the reading setting at ten posts because this affects all post types, not only the blog. Ideally, I’d like to set the number of posts in the looper and have that amount show on every page until there aren’t any more posts.

I appreciate your help — I feel like I’ve set this up correctly, but I’m not seeing the correct output. Even if that’s not the case, I’d be happy to be shown otherwise in order to achieve the desired result.

Hello @WaggingLabs,

Are you trying to exclude post items tagged as “Podcast”? Your condition is the reason why you have a different number of items displaying on pages. Please REMOVE your condition.

The correct way of excluding the Podcast post items is by doing this:
1.) Check out this article: https://www.wpbeginner.com/wp-tutorials/how-to-exclude-a-category-from-your-wordpress-homepage/#aioseo-method-2-exclude-a-category-from-wordpress-homepage-using-code

2.) Modify $query->set( 'cat', '-5' ); into 'tag__not_in', array( 98 ) where 98 is the tag ID of the Podcast tag. Please refer to this article:

Be advised that custom coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Kindly let us know how it goes.

Hi @ruenel,

Yes, I the exclusion is intentional (as mentioned in previous post). Thanks for providing the recommended method of exclusion. I will try to make this work for the blog page instead of the homepage.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.