It’s possible to pass multiple sets of arguments to date_query
, so if you set relation
to OR
for them, you should get posts that match either, meaning that you could get the posts you want like this:
'date_query' => [
'relation' => 'OR',
[
'month' => 1,
'year' => 2019,
],
[
'month' => 5,
'year' => 2019,
],
],