Site logo

Archived topic

How to show pagination like this

9 replies · Started by Ajay Nehra on December 31, 2021

Viewing posts 1–10 of 10

Give this CSS a try:

.paging-navigation .nav-links>* {
    padding: 10px 16px;
    background-color: lightgrey;
    color: black;
    border-radius: 4px;
}
.paging-navigation .nav-links span.page-numbers.current {
    background: blue;
    color: #ffffff;
}

I also want to remove the "dots"
And I want to change "Next →" as well. please check the image

Can you link me to your site?

please check Private information

1. Add this PHP snippet to show all the page numbers:

add_filter( 'generate_pagination_mid_size','tu_increase_pagination_numbers' );
function tu_increase_pagination_numbers() {
    return 100;
}

Adding PHP: https://docs.generatepress.com/article/adding-php/

2. Change the CSS to this:

.paging-navigation .nav-links>* {
    padding: 10px 16px;
    background-color: lightgrey;
    color: black;
    border-radius: 4px;
}
.paging-navigation .nav-links span.page-numbers.current {
    background: blue;
    color: #ffffff;
}
a.next.page-numbers > span {
    display: none;
}

how to replace next with » and Previous with «

Thanks

You're welcome

This archived topic is closed to new replies.