Created
July 25, 2016 08:03
-
-
Save oliwa/626e20699a8aca558d8c643201744891 to your computer and use it in GitHub Desktop.
Get Terms from a Custom Post Type: 2 Methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Get Taxonomy Title from active Taxonomy --> | |
<?php // https://wordpress.org/support/topic/taxonomy-title-output ?> | |
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?> | |
<!-- List all Taxonomy Terms that are assigned --> | |
<?php // https://codex.wordpress.org/Function_Reference/the_terms ?> | |
<?php the_terms( $post->ID, 'glossary-categories', '', ', ', ''); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment