[resolved] How to get "Blog pages show at most" in frontend (4 posts)

  1. janpleva
    Posted 3 years ago #

    I need to get the default number of posts, as it is in Settings>Reading>Blog pages show at most>[Number] is there any function for this? or where is it sored in DB?

  2. Not sure what you mean by at most.
    I think that it's best to set it to a certain number like 10 or 20.
    If it's more than that, then there will be lots of calls to the database and your site will take forever to load.

    You might want to choose a theme that has infinite scroll, that way, when people reach the bottom, it will just load more posts, just like twitter does at the bottom of the page.

  3. esmi
    Forum Moderator
    Posted 3 years ago #

    Try using get_option('posts_per_page ');

  4. janpleva
    Posted 3 years ago #

    Great, thanks esmi, this is exactly what I meant

Topic Closed

This topic has been closed to new replies.

About this Topic