Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Date query – Jan to Feb OR last two months

Filter items between January to February OR items from the last two months.

$date_query = array(
	'relation' => 'OR',
	array(
		'before' => array(
			'month' => 2,
		),
		'after' => array(
			'month' => 1,
		),
		'inclusive' => true,
	),
	array(
		'after'         => '2 months ago',
	),
);