Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

$query_boletos

// WP_Query arguments
$args = array(
	'post_type'              => array( 'boletos' ),
	'post_status'            => array( 'publish' ),
	'nopaging'               => false,
	'posts_per_page'         => '1000',
	'ignore_sticky_posts'    => true,
	'order'                  => 'ASC',
	'orderby'                => 'title',
	'tax_query'              => array(
		'relation' => 'AND',
		array(
			'taxonomy'         => 'sorteo',
			'terms'            => '3',
			'field'            => 'term_id',
			'operator'         => 'AND',
			'include_children' => false,
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();