Site logo

Archived topic

Alignment of pagination buttons after editing

3 replies · Started by nomadiceman on July 12, 2021

Viewing posts 1–4 of 4

Hi guys,

Ive added this snippet from another post from Tom:

add_filter( 'generate_next_link_text', function() {
    return 'Older Posts';
} );

add_filter( 'generate_previous_link_text', function() {
    return 'Newer Posts';
} );

Then I added this CSS from I believe David from another post:

/* Center Navigation */
#nav-below {
    text-align: center;
}

/* Page Number styling */
#nav-below .page-numbers:not(.dots) {
    background-color: #fff; 
    color: #000;
    border: 1px solid #000;
    padding: 5px 15px;
    box-sizing: border-box;
    line-height: 30px;
}

/* Change current and hover colors */
#nav-below .page-numbers:not(.dots):hover,
#nav-below .page-numbers.current {
    background-color: #333;
    color: #fff;
    border: 1px solid #333;
}

Then I added this CSS to remove the dots:

.page-numbers:not(.next):not(.prev) {
    display: none;
}

I however cannot figure out why the alignment when in mobile is over to the right and not centered

Any help would be great

Hi there,

Can you try adding this CSS?

@media(max-width:768px){
nav#nav-below {
    margin: 0 0 40px 0;
}
}

it seems to have corrected itself haha

I think maybe I had some caching still on.

Ill keep an eye on it

Thank you

No problem. Let us know if you need further help w/ it. :D

This archived topic is closed to new replies.