WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. janpleva
    Member
    Posted 1 year 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?
    Thanks!

  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 1 year ago #

    Try using get_option('posts_per_page ');
    http://codex.wordpress.org/Function_Reference/get_option

  4. janpleva
    Member
    Posted 1 year ago #

    Great, thanks esmi, this is exactly what I meant

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags