Support » Themes and Templates » jeans » Home Page Number of posts

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator keesiemeijer

    (@keesiemeijer)


    moderator


    You can set the allowed number of posts in wp-admin > Settings > Reading. This setting will affect all the pages that show lists of posts, like your home page, archive pages, search results pages.

    Michael

    (@alchymyth)


    Forum Moderator


    have you tried dashboard – settings – reading: Blog pages show at most [ ] posts

    if this deos not work, or you have other reasons not to use the setting, then you could try to add some code to functions.php of the theme;

    example:

    add_action('pre_get_posts','jeans_set_posts_per_page_for_home');
    function jeans_set_posts_per_page_for_home( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'posts_per_page', 20 );
        }
    }

    http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

    Wow That was easy, I missed the setting under reading! I made the change from 10 to 18, worked!!
    Thank You for the fast reply!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Home Page Number of posts’ is closed to new replies.