Does it make sense to assign functions like is_paged() to a variable rather than using it multiple times?

So, all query conditionals (is_paged, is_singular, etc) look something like this: function is_paged() { global $wp_query; if ( ! isset( $wp_query ) ) { _doing_it_wrong( __FUNCTION__, __( ‘Conditional query tags do not work before the query is run. Before then, they always return false.’ ), ‘3.1’ ); return false; } return $wp_query->is_paged(); } Globalize $wp_query … Read more

Get current page number of splitted article

For multi-page posts: The $page global variable returns the current page of a multi-page post. The $numpages global variable returns the total number of pages in a multi-page post. For paginated archive index pages: The $paged global variable returns the current page number of a paginated archive index. To use any of these variables, simply … Read more