Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Bus Dir Main query

// WP_Query arguments
$args = array(
	'post_type'              => array( 'wpbdp_listing' ),
	'tax_query'              => array(
		array(
			'taxonomy'         => 'wpbdp_category',
			'field'            => 'slug',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();