Jump to content


Photo
- - - - -

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

sticky post post loop posts per page

Best Answer Danny , 22 February 2013 - 12:38 PM

OK, I have just enable Twenty Twelve and the issues persists, therefore you will need to contact Wordpress support. There is something wrong with your Wordpress installation from the looks of it, as this is not normal behaviour.

Go to the full post


  • Please log in to reply
31 replies to this topic

#1 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 14 February 2013 - 04:26 PM

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.



#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 February 2013 - 04:40 PM

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.



#3 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 14 February 2013 - 05:00 PM

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 :)



#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 15 February 2013 - 02:24 AM

Simon,

 

Simon (ours) will be back in tomorrow morning, GMT.  I'll leave him a note.



#5 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 15 February 2013 - 02:57 PM

Thanks, it would be good to know whats going on! :)



#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 15 February 2013 - 03:38 PM

I have no way to reproduce this, I have tried it with total posts set to 5 with 1 and 2 stickies and every time i get 5 posts on the blog page, tried with the framework, 2010, 2011 and 2012 themes all the same result.

You can see here 

Please Login or Register to see this Hidden Content

top post is a sticky and only 5 results.

 

Maybe there is a plugin you are using interfering with the loop?



#7 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 18 February 2013 - 10:29 AM

I've deactived all plugins but still 12 posts showing on the blog page - 2 sticky + 10 normal posts.

 

When I change the WP setting from 10 to 8 I then get 2 sticky + 8 normal posts.

 

I've swapped themes and the same thing happens.

 

All the support posts I ready on the subject seemed to indicated this was how it was designed to work.



#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 16376 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 February 2013 - 10:59 AM

I get the same result as our developer Simon, I cant recreate your issue.



#9 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 18 February 2013 - 12:28 PM

Could it be something with my installation - ie server settings and not WP or Pagelines?



#10 Danny

Danny

    Is Awesome!

  • Moderators
  • 16376 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 February 2013 - 12:41 PM

Can you provide your PHPinfo and enable PageLines debug mode please, then we can if this is the case.

 

PHPinfo - 

Please Login or Register to see this Hidden Content

PageLines debug - PageLines > Site Options > Advanced



#11 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 18 February 2013 - 01:43 PM

Thanks, yes I've done that - I don't want to disclose the web address though - can I send this to you via email?



#12 Danny

Danny

    Is Awesome!

  • Moderators
  • 16376 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 February 2013 - 03:21 PM

Send it via the URL so I can check the debug and also link me to the phpinfo please.



#13 Danny

Danny

    Is Awesome!

  • Moderators
  • 16376 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 18 February 2013 - 04:09 PM

After viewing your debug information, I noticed that you have a plugin installed called Sticky Posts, why are you using this plugin ?

 

When testing, I never used any plugin, so this may be the cause of your issue.



#14 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 18 February 2013 - 04:51 PM

I deactivated it and all plugins and the issue was still there - I can deactivate everything again if you like?

 

The plugin dsiaplays the 2 most recent sticky posts on the homepage.



#15 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 18 February 2013 - 10:50 PM

Hi,

 

If a third party plugin is causing you to see two extra posts and you don't want them, the solution would be to deactivate the plugin.  Neither WordPress nor PageLines do 'sticky posts' on their own.  I think my colleagues were confused between full-width posts and sticky posts.  That can be established via settings.

 

There are many options for sticky-post placement, from addition of PHP code to shortcode options on the blog page. However, you may not add any content to the editing field.

 

What you can do is activate a sidebar (full width, universal or content box) via Drag & Drop in the Blog template at Dashboard > PageLines > Drag & Drop > Content Area making sure that the sidebar is placed above the top of PostLoop.

 

Then, you'd go to Dashboard > Appearance > Widgets.  Add a text widget to the sidebar and in the text widget, add any code you were expecting to use on the blog page.  If you're using Content Box, you'd do it via Dashboard > PageLines > Page Options > Blog > Content Box, adding the code needed, right there.



#16 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 19 February 2013 - 09:15 AM

Thanks but as I've mentioned a couple of times I've disabled all plugins and its still happening so it's not looking like it could be a plugin.

 

I'm already using a content box elsewhere on the site so if needed I'll look at that but at the moment it doesn't look like it is the sticky post plugin as the problem is still happening with all plugins disabled.



#17 Danny

Danny

    Is Awesome!

  • Moderators
  • 16376 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 February 2013 - 09:30 AM

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.

 

Please Login or Register to see this Hidden Content

 

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



#18 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 19 February 2013 - 02:37 PM

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?


#19 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 19 February 2013 - 04:37 PM

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.



#20 MissT

MissT

    Super Member

  • Members


  • 229 posts
  • LocationUK
  • Country: Country Flag

Posted 20 February 2013 - 08:42 AM

The site is in development in a subdirectory i.e. WP is not installed in the root directory - could it be something to do with that?







Also tagged with one or more of these keywords: sticky post, post loop, posts per page