I've inherited maintenance of a theme from another developer, and I'm trying to understand if there's a good reason why they did this.
The theme includes a page template that runs a custom query for posts. It's set up like this:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $query = new WP_Query(); $query->query('posts_per_page='.get_option('posts_per_page').'&paged=' . $paged);
What I do, and what I've always seen others do, is pass in the query arguments while creating the new class instance, i.e.
Does calling the
$query->query($args) method do anything different? Is it identical from a performance perspective? (I want to make sure it's not hitting the database twice.)