Title: Flex Posts Pagination
Last modified: June 13, 2020

---

# Flex Posts Pagination

 *  [stefano2](https://wordpress.org/support/users/stefano2/)
 * (@stefano2)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/flex-posts-pagination/)
 * Hello, for Flex Posts Plugin change (flex-posts/includes/functions.php)
 * Replace this code :
 * function flex_posts_pagination( $total ) {
    if ( $total > 1 ) { $links = paginate_links(
   apply_filters( ‘flex_posts_pagination_args’, array( ‘total’ => $total, ‘current’
   => flex_posts_get_current_page(), ‘mid_size’ => 1, ‘prev_text’ => ‘<span class
   =”screen-reader-text”>’ . __( ‘Previous’, ‘flex-posts’ ) . ‘</span> <span aria-
   hidden=”true”>«</span>’, ‘next_text’ => ‘<span class=”screen-reader-text”>’ .
   __( ‘Next’, ‘flex-posts’ ) . ‘</span> <span aria-hidden=”true”>»</span>’, ) ));
   if ( $links ) { echo ‘<div class=”fp-pagination”>’; echo ‘<span class=”screen-
   reader-text”>’; echo esc_html__( ‘Page’, ‘flex-posts’ ); echo ‘: </span>’; echo
   wp_kses( $links, flex_posts_get_allowed_html() ); echo ‘</div>’; } } }
 * by this code :
 * function flex_posts_pagination( $total ) {
    if ( $total > 1 ) { $links = paginate_links(
   apply_filters( ‘flex_posts_pagination_args’, array( ‘total’ => $total, ‘current’
   => flex_posts_get_current_page(), ‘mid_size’ => 1, ) ) );
 *  if ( $links ) {
    echo ‘<div class=”fp-pagination”>’; echo ‘<span class=”screen-
   reader-text”>’; echo esc_html__( ‘Page’, ‘flex-posts’ ); echo ‘: </span>’; echo
   wp_kses( $links, flex_posts_get_allowed_html() ); echo ‘</div>’; } } }
 * and in your css theme child create a css
 * /***** Pagination *****/
    .fp-pagination { clear:both; position:relative; font-
   size:16px; /* Pagination text size */ line-height:20px; margin: 40px 0 0 400px;}.
   fp-pagination span, .fp-pagination a { margin: 0 8px 0 0px; padding:8px 14px;
   text-decoration:none; width:auto; color:black; /* Pagination text color */ border-
   radius: 100%!important; /* background: #555; */ -webkit-transition: background.
   15s ease-in-out; -moz-transition: background .15s ease-in-out; -ms-transition:
   background .15s ease-in-out; -o-transition: background .15s ease-in-out; transition:
   background .15s ease-in-out; } .fp-pagination a.next { background-color: #406343!
   important; color: #fff!important; border-radius: 5px!important; } .fp-pagination
   a.prev { background-color: #406343!important; color: #fff!important; border-radius:
   5px!important; } .fp-pagination a.next:hover { background-color: #4D7C51!important;
   color: #fff!important; border-radius: 5px!important; } .fp-pagination a.prev:
   hover { background-color: #4D7C51!important; color: #fff!important; border-radius:
   5px!important; } .fp-pagination a:hover{ color: #fff!important; padding:8px 14px;
   background: #406343!important; border-radius: inherit!important; /* background:#
   6AAC70; */ border-radius: 100%!important; } .fp-pagination .current{ padding:
   8px 14px; border-radius: 100%!important; background: #A53636; /* Current page
   background */ color:#fff; }
 * And work perfectly.
 * Good Luck!

Viewing 1 replies (of 1 total)

 *  [bobbieness](https://wordpress.org/support/users/bobbieness/)
 * (@bobbieness)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/flex-posts-pagination/#post-13500532)
 * I just tried this and it completely broke my website. I had to go into recovery
   mode to deactivate the plugin. WARNING: DO NOT TRY THIS.

Viewing 1 replies (of 1 total)

The topic ‘Flex Posts Pagination’ is closed to new replies.

 * ![](https://ps.w.org/flex-posts/assets/icon-128x128.png?rev=1871802)
 * [Flex Posts - Widget and Gutenberg Block](https://wordpress.org/plugins/flex-posts/)
 * [Support Threads](https://wordpress.org/support/plugin/flex-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/flex-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flex-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flex-posts/reviews/)

## Tags

 * [pagination](https://wordpress.org/support/topic-tag/pagination/)

 * 1 reply
 * 2 participants
 * Last reply from: [bobbieness](https://wordpress.org/support/users/bobbieness/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/flex-posts-pagination/#post-13500532)
 * Status: not resolved