Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Style Wordpress Post Listing Pagination
#1
Hello. Guys.

Today I am going to write about styling Wordpress Post Pagination Styling. In order to style your Wordpress pagination. Just copy the below CSS code to your WordPress style.css or your custom CSS style code.

Code:
.page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px 0 0;
    border: 1px solid #eee;
    line-height: 1;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 600;
}
.page-numbers.current,
a.page-numbers:hover {
    background: #f9f9f9;
}

If you don't have pagination in your Wordpress post listing page? If not, just copy the below PHP code to the page which you want to show the pagination code.

PHP Code:
<?php the_posts_pagination( array(
    
'mid_size' => 2,
    
'prev_text' => __'Back''textdomain' ),
    
'next_text' => __'Onward''textdomain' ),
) ); 
?>

Thanks.

You can call the pagination code using include code in php.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)