Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi kaio. Check Settings > Reading and set the “Blog pages show at most” option.

    Thread Starter kaio cesar

    (@kaio-cesar)

    Hi again, Bdbrown.

    Ok.
    I need something like that: http://demo.alxmedia.se/hueman/

    I have 3 slides and i need just 8 or 6 posts after that.
    And the other post make pages.

    Add this function to your child theme functions.php file:

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

    If you aren’t currently using a child theme:
    1. In Theme Options click the Help tab in the upper righthand corner.
    2. One of the options in the list is to download a sample child theme. This downloads the theme zip file to your local computer.
    3. Install the new theme in your Admin panel by selecting Add New > Upload Theme > Choose File, then select the zip file you downloaded.
    4. Activate the child theme.
    You’ll now have a pre-configured child theme with a style.css file and functions.php file to which you can add customizations.

    Thread Starter kaio cesar

    (@kaio-cesar)

    Awesome!!
    Thank you.

    i don’t know why the plugin don’t show the same.
    But, ok.

    i’ll look for the answer.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Limit post index’ is closed to new replies.