Jump to content
MissT

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

Recommended Posts

MissT+    4
MissT

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
Simon    247
Simon

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
MissT+    4
MissT

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
Rob    547
Rob

Simon,

 

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


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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

Share this post


Link to post
Share on other sites
Simon    247
Simon

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 http://pross.org.uk/ top post is a sticky and only 5 results.

 

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

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

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


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

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

 

PHPinfo - http://codex.wordpress.org/Finding_Server_Info

PageLines debug - PageLines > Site Options > Advanced


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

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


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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.

Share this post


Link to post
Share on other sites
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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
catrina    103
catrina

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.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
MissT+    4
MissT

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?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

I have just installed Wordpress into a sub directory and have no issue, the sticky posts are working as intended. You mention in a earlier post, you switched theme and had the same outcome. Therefore, this is most likely an issue with either your Wordpress installation or your server.


I recommend you ask this question on the Wordpress support forums as their team will be best suited to resolve your issue, due to it most likely being Wordpress related.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
MissT+    4
MissT

Thanks Danny - will do.

Share this post


Link to post
Share on other sites
Simon    247
Simon

Can you please try the default wordpress theme and see if you still get the problem.

Share this post


Link to post
Share on other sites
MissT+    4
MissT

I had tried this before and had the same problem - tried it again anyway - all plugins deactivated, tried all 3 WP default themes - Twenty 10, 11 and 12.

 

3 sticky posts, 'Blog pages show at most' = 5

 

Posts appearing on blog page = 8 for all themes (3 sticky + 5 normal)

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Can you provide a link to the site in question please (I apologise if you have previously linked, I was unable to see) and in the custom CSS for that site, can you add the following CSS.

 

So we can clearly see the sticky posts.

 

 

.sticky { background: red; }

Please search our forums, before posting!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • flourishdesignstudio
      By flourishdesignstudio
      I am working on a site that uses post categories to organize a large collection of cocktail recipes (such as 'Fall Cocktails', 'Winter Cocktails', 'Spring Cocktails', and 'Summer Cocktails'). I am trying to style the category pages so that a user will land on the Fall page and see the fall posts in a two-column setup. The Pagelines Content section has no real post display options to speak of so I am trying to work within the Loops section, which does produce the overall visual effect that we are hoping for. However, it means that I have to create a Loops section for every single category page and tell it to show the posts for that specific category (Fall posts on the Fall Category page, Spring posts on the Spring page, etc). We actually have about 25 cocktail categories so creating unique pages for each category isn't going to be very time effective for us - especially if we want to change a setting later and have to go to each page to do that.
      So, my question is whether or not there is a way to control general category pages or if there are any other good post loop options that you recommend. This used to be much easier in the past versions of Pagelines and DMS so I just want to make sure I am not missing something within this new system.
      Thanks so much for the help!
    • huskers2011
      By huskers2011+
      I just upgraded to the platform 5 and all my post lop content in static pages is not visible on the site, although it is  selected in the page setup. 
    • B1Guy
      By B1Guy
      I am trying to have my post show up on more than the static page that is defined in >settings>reading.
      I would very much like the post to able to be displayed on 2 other pages "like a second and third recent posts that is displayed like a blog.
      Any help would be great.
      I am somewhat familiar with how coding works but not advanced enough to write the code I think I need for this.
      is there an easier way.
    • alasdairc
      By alasdairc
      Good Morning,
       
      Website URL: http://northernreivers.org/updates/
      Framework Version:     2.1.5
      WordPress Version:     3.9.2
      Server/Host:                 GoDaddy Manage WP Hosting

      Details:
       
      I'm struggling to get the WP Content / Loop to display at this site.
       
      There are posts on the site which I can display using a Widget Shortcode workaround but as you can see here it's not as pretty. http://northernreivers.org/field-guide/
       
      Tried disabling all the plugins as well and got the same result.
       
      Hoping to be told I'm an idiot and I've just missed something.
       
      Thanks in advance
       
      A
       
      UPDATE: I just downloaded DMS 2.1.5 and did an install as previously I had upgraded. Unfortunately still getting the same results.
    • mtaus
      By mtaus+
      I just updated the DMS theme.Following the update, I am no longer able to configure the List Mode layout to display a wide full-column image above the post text. Instead only the thumbnail image view is available.
       
      URL: http://blog.abodo.com
      DMS: 1.1.6
      Pro Plugin: 1.5
       
×