Archived

This topic is now archived and is closed to further replies.

  • 0

How to include sticky posts within the 'Blog pages show at most' WP setting


Question

Posted · Report post

I'd like to make blog pages be a set number of posts per page including sticky posts.

 

It looks like the way WP works is to add on all the sticky posts to the 'Blog pages show at most' WP setting - so if you have 2 sticky posts and have set the 'Blog pages show at most' setting to 10 the first blog page will show 12 post.

 

I'd prefer that every page only shows 10 posts - so the first blog page would show 2 sticky posts + 8 'normal' posts = 10 posts on the page.

 

I'm guessing this would mean using a base child theme and altering 'the loop' somehow?

 

Any help much appreciated.

Share this post


Link to post
Share on other sites

31 answers to this question

Posted · Report post

Ok thanks Danny I'll contact WP support.

Share this post


Link to post
Share on other sites

Posted · Report post

If disabling the plugins hasn't resolved your issue then I am not entirely sure what is causing the issue. I set Settings > Reading > to display 5 posts with 2 sticky posts, when I view my blog, I have two sticky posts and 3 standard posts.

 

http://d.pr/i/cfjg

 

I have zoomed out and used the .sticky class to highlight the sticky posts.

Share this post


Link to post
Share on other sites

Posted · Report post

I have my blog set to show 10 posts on blog page, i have 2 sticky posts. Only 8 posts show under the 2 stickys. I added a new post, it appeared under the 2 stickies and still only 10 posts showing in total.

Share this post


Link to post
Share on other sites

Posted · Report post

hmmm thats strange - I def have 12 on mine.

 

blog set to show 10 posts on page.

 

2 sticky posts + 10 ordinary posts in total in the whole blog - all are showing on the one page.

 

I'm using WordPress 3.5.1. and Pagelines Framework 2.4.

 

I'd read up on this and everyting I'd read concurred with sticky posts being ignored from the post count per page.

 

Thanks for the very quick reply :)

Share this post


Link to post
Share on other sites

Posted · Report post

If its not a plugin then is there any chance its a server setting or perhaps a difference in blog page settings within pagelines from my install to yours?

 

Just trying to get my head round this...so is it right to say that...

 

  1. Pagelines is including the number of sticky posts in the 'Blog pages show at most' setting?
  2. By default WP does not include the sticky posts in the 'Blog pages show at most' setting? (as most of the info out there seems to point to this)
  3. For some unknown reason (at this point in time) my WP & Pagelines install is doing the oposite of what it should be doing and is adding sticky posts on top of the ''Blog pages show at most' setting?

Share this post


Link to post
Share on other sites

Posted · Report post

Pagelines is including the number of sticky posts in the 'Blog pages show at most' setting? - Yes, and since this behavior isn't occurring on your install, it has to be something specific to your install that's preventing it from working properly.

Share this post


Link to post
Share on other sites