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