How do I detect which page I'm on within a paginated post?

by Industrial Themes   Last Updated September 17, 2018 14:08 PM

I'm using wp_link_pages() to paginate a post. I want to show something below the post content only on the first page of the post. Naturally I thought I'd use get_query_var('paged') to get the page number, but it returns 1 regardless of which page I'm on. I know I could parse out the URL manually to see which page I'm on, but there has to be a built in WordPress function for this.



Related Questions



Override wp_link_pages pagebreak with filter

Updated August 07, 2017 22:08 PM

Wordpress wp_link_pages show only next/prev link

Updated March 26, 2015 09:02 AM


How to ignore or disable nextpage tag?

Updated April 08, 2015 18:03 PM