When I call the template part in the second instance, how do I ensure
that no feature_id value is resident, since none is passed?
I’m afraid you misunderstood what set_query_var
really does. It doesn’t pass anything and it doesn’t work only for the next get_template_part
call.
OK, so what does it really do? From docs:
Set query variable.
And here’s its code:
function set_query_var( $var, $value ) {
global $wp_query;
$wp_query->set( $var, $value );
}
So now everything should be clear. So let’s take a look at your original code:
set_query_var('feature_id', array(143866)); // <- sets query var called feature_id to 143866
set_query_var('tax_meta_value', 'Payments'); // <- set query var called tax_meta_value to Payments
get_template_part('partials/page-blocks/block_tag_new');
set_query_var('tax_meta_value', 'Venture Capital'); // <- sets tax_meta_value to Venture Capital
// feature_id is still 143866, because it hasn't been changed
get_template_part('partials/page-blocks/block_tag_new');
If you want to unset the query var, you can set it to false/NULL:
set_query_var('feature_id', false);