[Support request] Remove Page Numbers from Home Page

Home Forums Support [Support request] Remove Page Numbers from Home Page

Home Forums Support Remove Page Numbers from Home Page

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #613274
    Mahendra

    Hello ,

    I want to remove the Page Numbers in Home Page of my blog

    See the Nubers are like the below in my Home Page .. I think this comes under page Number navigation . I want this to be removed completely .

    1 2 … 143 Next β†’

    #613295
    David
    Staff
    Customer Support

    Hi there,

    simplest way is to go to Customiser > Layout > Blog and select Use Infinite Scroll, this will then give the option if you want a load more button.

    #613940
    Mahendra

    I dont want infinte Scroll as it will start displaying all posts. Can Some one please help how to remove page Numbers from the Home Page

    #614188
    David
    Staff
    Customer Support

    With infinite scroll you have the option for a load more button which has to be pressed for more posts to load.

    Alternatively you can add this CSS:

    .paging-navigation {
        display: none;
    }

    https://docs.generatepress.com/article/adding-css/

    #614213
    Mahendra

    Thanks a lot !!!

    #614233
    David
    Staff
    Customer Support

    Glad to be of help

    #1600526
    Claudio

    Instead of hiding with display: none;
    how to remove the function from code?

    #1601049
    Tom
    Lead Developer
    Lead Developer

    You can try this:

    add_filter( 'generate_show_post_navigation', functon( $show ) {
        if ( ! is_singular() ) {
            return false;
        }
    
        return $show;
    } );
    #1601493
    Claudio

    thanks, work well

    #1601923
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #2257559
    Mahendra

    Hello Tom

    You mentioned :

    add_filter( ‘generate_show_post_navigation’, functon( $show ) {
    if ( ! is_singular() ) {
    return false;
    }

    return $show;
    } );

    Do i need to remove this code ??? Can you please let me know where this code is present ??? i also want to remove the PageNumbers from Homepage instead of Hide.

    #2257561
    Leo
    Staff
    Customer Support

    Hi there,

    Tom’s code can be added using one of these methods:
    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know if this helps πŸ™‚

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