I'm seperating long posts using <!--nextpage-->
but need to output user comments only on the last 'page' of a post. I can't find a way of counting the number of paginated pages and then outputting if page == last page.
Any help is appreciated
I'm seperating long posts using <!--nextpage-->
but need to output user comments only on the last 'page' of a post. I can't find a way of counting the number of paginated pages and then outputting if page == last page.
Any help is appreciated
You can check with $wp_query->query_vars['page']
. On the first page, this value won't exists, whereas on the subsequent pages it will be set with the current page number.
$currentPage = isset($wp_query->query_vars['page']) ? (int)$wp_query->query_vars['page'] : 1;