So pretty straightforward, apparently, however i aren't able to find any good examples either in a) the Wordpress Codex or b) in almost any good examples within the wild. I am just attempting to exclude a phrase out of this creation of terms from the custom taxonomy.

I opted for wordpress_get_object_terms rather than get_terms because I've the output must be formatted particularly also it appears wordpress_get_object_terms may be the only function that may get the job done, although get_terms will have an explicit 'exclude' option. So this is what I am dealing with:

<?php $taxopostid = $post->ID;
    $taxoquery = wp_get_object_terms( $taxopostid, 'work-type');
    $taxoslug = $taxoquery[0]->slug;
    $taxotitle = $taxoquery[0]->name; ?>

    <a href="<?php bloginfo('url'); ?>/blog-slug/<?php echo $taxoslug; ?>/" class="cat-link"><?php echo $taxotitle; ?></a>

Any ideas??

I am likely to assume 'worktype' may be the taxamony you need to exclude

step one

get all taxamonies excluding 'worktype' with get_terms (you are aware how to get this done right?)


Using the result create a flat array only that contains all of the fetched taxamonies (allows refer to it as $allTaxamoniesExcludingWorkType)


add this array because the second argument to

wp_get_object_terms($taxopostid, $allTaxamoniesExcludingWorkType);

not examined but this will help on the way.