Display Both next previous and number in single page

In a single page, I split long post by nextpage and shows pagination number or next/previous option.But I want to display both number and next-previous option. Here is my single page screenshot one is next-previous and another is number option.And My code is that:

function custom_nextpage_links($defaults) {
                 $args = array(
        'before'     = 'ul class="my-paginated-posts"ulli' . __( 'Section:', 'textdomain' ),
    'after'            = '/li/ul',
    'link_before'      = 'span class="page-link"',
    'link_after'       = '/span',
    'separator'        = ' ',
    'nextpagelink'     = __('Next raquo', 'textdomain'),
    'next_or_number'   = '',
    'previouspagelink' = __( 'laquo Previous', 'textdomain' ),
    'pagelink'         = '%',
    'echo'             = 1
);    

$r = wp_parse_args($args, $defaults);

return $r;
}
add_filter('wp_link_pages_args','custom_nextpage_links');

Topic nextpage pagination Wordpress

Category Web


If next/prev posts exist, the next/prev button will show. What i did here is to modify the next/prev labels :)

while( have_posts() ) :
  // Your loop
endwhile;

// Pagination
$pagination_args = array(
  'prev_text' => '<i class="fa fa-chevron-right" aria-hidden="true"></i>Previous post',
  'next_text' => 'Next post<i class="fa fa-chevron-left" aria-hidden="true"></i>' ); ?>
<div class="paginate_container"><?php echo paginate_links( $pagination_args ); ?></div>

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.