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


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

