• I wanted to display different number of post on homepage than on page 2, 3 and so on.. So I used that code in my function.php file:

    `function limit_posts_per_page() {
    if ( is_archive() )
    return 10;
    else
    return 9;
    }
    add_filter (‘pre_option_posts_per_page’, ‘limit_posts_per_page’);`

    It didn’t work, so I modified it and instead is_archive() I used is_paged() and now it works, I have 10 post on homepage and 9 on the remaining pages, but the only issue now is the last post on homepage appear again on page 2 as the first post.. How can I fixed that, probably need some tweaking with code, but I am not well versed in coding.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Same post repeated on Page 2’ is closed to new replies.