• 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)
  • 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.