There is no reason that query should behave differently on a single post page than on any other page. That is, there is no reason in the code posted. The only thing that I can think of would be that there is a filter interfering– perhaps a poorly written filter on pre_get_posts
or post_limits
.
You should be able to verify the SQL coming out of that query with var_dump($query1->request);
, and if it ends with anything other than LIMIT 0, 22
you have something interfering.
Based on additional information in the question:
The pre_get_posts
callback you posted should not, unless I am reading wrong, cause the query to return a single post. It should return more than 22 if anything. However, there are date conditions in that query…
AND wp_posts.post_date >= '2014:03:21 00:00:00'
AND wp_posts.post_date < '2015:03:21 00:00:00'
… that are not accounted for by your explicit query arguments. There must be another filter somewhere.