transmitstudio
10/4/2017 - 4:47 AM

Filter Taxonomy Terms to remove their links

<?php
// from @zestsms, bb slack

add_filter( 'do_shortcode_tag','zestsms_filter_shortcode_output', 10, 3);
function zestsms_filter_shortcode_output( $output, $tag, $attr ) {
	if($tag == 'wpbb') {
		if ( $attr[0] == 'post:terms_list' && ($attr['taxonomy'] == 'location' || $attr['taxonomy'] == 'job-type' || $attr['taxonomy'] == 'career-category')) {
			$output = strip_tags($output);
		}
	}

	return $output;
}