WordPress.org

Ready to get started?Download WordPress

Forums

jeans
[resolved] Home Page Number of posts (4 posts)

  1. Grabtopdeals
    Member
    Posted 1 year ago #

    I want to display more than 10 posts on my landing page. Does anyone know what sheet to change and where the change needs to be?

    My URL is http://www.grabtopdeals.com

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    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.

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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

  4. Grabtopdeals
    Member
    Posted 1 year ago #

    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!!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic