Site logo

[Resolved] Removing pagination

Home Forums Support [Resolved] Removing pagination

Home Forums Support Removing pagination

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #695835
    Vinay

    By default pagination is shown on front page, categories, tags, etc like 1 2 … 76 Next. How it can be removed from front/home page using php.

    #695859
    David
    Staff
    Customer Support

    Hi there,

    so would you want infinite scroll scroll on the front page?

    #695880
    Vinay

    No i don’t want infinite scroll

    #695884
    David
    Staff
    Customer Support

    So the front page will display a limited number of posts or all of them?
    Sorry just need to know so we can provide the best solution.

    #695900
    Vinay

    Yes just lastest few say 10 posts

    #696352
    Vinay

    Any one please reply

    #696412
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try this function:

    add_action( 'wp', function() {
        if ( is_front_page() ) {
            add_filter( 'generate_show_post_navigation', '__return_false' );
        }
    } );
    #1446148
    Javier Lorente

    This function work on generatepress 2.x but not in 3.x. will work in 3.x.x?

    #1446349
    Leo
    Staff
    Customer Support

    Looks like you’ve discovered a bug and we’ve fixed that in the next Alpha version:
    https://github.com/tomusborne/generatepress/commit/8cb4f2590eb760be9a1ac8c71736a2455080aab6

    Thanks!!

    #1489873
    Davidofs Digital LTD

    The filter that still works for me in version 3.0 is this one:

    add_filter( ‘generate_show_post_navigation’, ‘__return_false’ );

    #1489968
    David
    Staff
    Customer Support

    Thanks for letting us know – the bug was patched before the final release 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.