Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Query post Orari Ognibene

// WP_Query arguments
$args = array(
	'name'                   => 'orario-invernale',
	'post_type'              => array( 'orario' ),
	'post_status'            => array( 'publish' ),
	'nopaging'               => true,
	'posts_per_page'         => '1',
	'date_query'             => array(
		array(
			'before' => array(
				'month' => 10,
				'day'   => 15,
			),
			'after' => array(
				'month' => 5,
				'day'   => 15,
			),
		),
	),
);

// The Query
$orario_aperto_query = new WP_Query( $args );

// The Loop
if ( $orario_aperto_query->have_posts() ) {
	while ( $orario_aperto_query->have_posts() ) {
		$orario_aperto_query->the_post();
		// do something
	}
} else {
	// no posts found
}

// Restore original Post Data
wp_reset_postdata();