Archived topic
Remove Page Numbers from Home Page
11 replies · Started by Mahendra on July 2, 2018
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 →
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.
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
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;
}
Thanks a lot !!!
Glad to be of help
Instead of hiding with display: none;
how to remove the function from code?
You can try this:
add_filter( 'generate_show_post_navigation', functon( $show ) {
if ( ! is_singular() ) {
return false;
}
return $show;
} );
thanks, work well
You're welcome :)
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.
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 :)