Archived topic
Change the dots between page numbers on the blog archive to show all pages
8 replies · Started by Jared on July 21, 2020
On my blog archive page it looks like this:
← Previous 1 … 3 4 5 Next →
Is there any way to remove the dots, showing all page numbers instead?
Trying for this:
← Previous 1 2 3 4 5 Next →
Kind regards
Hi there,
Any chance you can link us to the site in question?
Hoping that we could use a CSS solution for this.
You can edit the original topic and use the private URL field.
Let me know :)
Hi there,
Any chance you can link us to the site in question?
Hoping that we could use a CSS solution for this.
You can edit the original topic and use the private URL field.
Let me know :)
Hi Leo,
Thanks for helping me.
Sure, I've added the site.
Can you try adding this CSS:
.page-numbers.dots {
display: none;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Then add this PHP:
add_filter( 'generate_pagination_mid_size','tu_increase_pagination_numbers' );
function tu_increase_pagination_numbers() {
return 50;
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Great that worked!
I added the CSS and used code snippets to add the PHP.
Thanks a lot, much appreciated.
Kind regards,
Jared
No problem :)
Just to mention that you will need to increase the 50 in the PHP snippet once you have 50+ pages.
Great to know, I'll bookmark this page for reference.
Thanks again!
No problem :)