WP_Query arguments order

Given the following example of a custom query

$query = new WP_Query(array(
    'posts_per_page' = 7,
    'categor_name' = 'events',
    'offset' = 5
));

Does the order of arguments matter?

Will this query first select all posts with the given category and then offset the first 5 or will it first offset all 5 posts then select posts with given category?

Topic offsets wp-query Wordpress

Category Web


The order doesn't matter. That query will get 7 posts from the "events" category, skipping over the 5 most recent (since the default order is by date).

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.