1

I want show number of current page and count of all pages, near my posts paginations. I am talking about this enter image description here

1

You can get the current page number by get_guery_var('paged') If it doesn't return value, it is 1'st page.

To get the number of total pages, you need to get the total number of posts and divide by the number of per_page. Or you can simply use max_num_pages of $wp_query object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.