Skip to content

Instantly share code, notes, and snippets.

@mikeoberdick
Last active August 1, 2017 17:51
Show Gist options
  • Save mikeoberdick/dd4591a1d64c95e4e32b0ce0d39b5a99 to your computer and use it in GitHub Desktop.
Save mikeoberdick/dd4591a1d64c95e4e32b0ce0d39b5a99 to your computer and use it in GitHub Desktop.
Show Tax Terms for Single CPT
<?php $taxonomy = 'project-industry';
$terms = get_terms($taxonomy); // Get all terms for the taxonomy ?>
<?php foreach ( $terms as $term ) { ?>
<button type="button" data-filter="<?php echo $term->name; ?>"><?php echo $term->name; ?></button>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment