How to Show Next, Previous, and Page Numbers with wp_link_pages

Question

I want to modify the output of wp_link_pages.

Basically what I need is to show Previous and Next buttons and current page/total number of pages.
I created the Previous and Next button. Now in between them I want to add a current page and the total pages number.

Here is my code

wp_link_pages( array(
    'before' => '<div class="page-links">' . __(''),
    'after' => '</div>',
    'next_or_number' => 'next',
    'nextpagelink' => __('Next'),
    'previouspagelink' => __('Previous'),
    'pagelink' => '%',
    'echo' => 1,
) );

I am not sure what to do.
The effect I want to get is just like below image.enter image description here

0
, Anita Desai 2 months 0 Answers 38 views 0

Leave an answer