• I’ve tried searching for this every which way I can, but I keep getting “how to” answers rather than answers to “why”. Hopefully, I’ve got the right forum.

    I noticed an oddity with the default loop and sticky posts. It seems sticky posts mess with the post counter in some fashion, and I can’t seem to figure out how (or why).

    I started out with the standard 10 posts for the index page. Then I started noticing that when I marked enough posts as sticky, the count on the page started changing. It seemed pretty weird, so I started experimenting.

    Right now I have 13 posts marked as sticky, and the index page has a total of 16 posts. Yesterday I had 7 marked as sticky, and the total posts displayed was 14.

    Just now, I changed the posts per page to 5. With 13 sticky posts, 14 posts displayed.

    Now, I would have expected the number of posts displayed to be 5, honoring the posts per page value, but it’s not. Even with the sticky posts.

    I have deactivated all other plugins and switched to the twenty-fifteen theme, and the results are the same.

    So, my question. Shouldn’t the default WordPress loop honor the posts-per-page value, even when sticky posts are in the mix? If not, why not?

  • The topic ‘Sticky post question’ is closed to new replies.