Archived topic
Customizing Pagination
5 replies · Started by Dilip Kumar on June 23, 2017
Hi,
I am looking to customize the pagination on my blog. I want to remove the 1,2,3.... pagination and replace it with just "read the next post".
How can I do it?
Is it possible to show something like "Show all Posts" and link it to the archives page?
Regards
Dilip
Hi there,
Try this:
.paging-navigation .nav-next,
.paging-navigation .nav-previous {
display: block;
}
.nav-links {
display: none;
}
That seems to have worked to some extent. But how do I add something like “Show all Posts” and link it to the archives page, if it is possible..
What page would be the "archives" page?
I have created an archives page which has a list of all the posts. This is the one I want to link to.
Try this:
add_action( 'generate_paging_navigation', 'tu_add_pagination_archives_link' );
function tu_add_pagination_archives_link() {
?>
<a href="YOUR URL HERE">Your link text</a>
<?php
}
Adding PHP: https://docs.generatepress.com/article/adding-php/