Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

sb_membership2

// WP_Term_Query arguments
$args = array(
	'taxonomy'               => array( 'sb_membership' ),
	'name'                   => array( '2020-2021' ),
	'slug'                   => array( '2020-2021' ),
	'hierarchical'           => false,
	'order'                  => 'ASC',
	'orderby'                => 'id',
	'fields'                 => 'ids',
);

// The Term Query
$check_membership = new WP_Term_Query( $args );

// The Loop
if ( ! empty( $check_membership ) && ! is_wp_error( $check_membership ) ) {
	// do something
} else {
	// no terms found
}