Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php foreach ($terms as $term) {echo '<a href="'.get_term_link($term->slug, 'sitecat').'">'.$term->name.'</a>,';} ?> >> <a href="<?php the_permalink(); ?>"><?php the_title('', ''); ?></a></h2></span>
- $terms = get_the_terms( $post->ID, 'mytaxonomy' );
- $term = array_pop($terms);
- echo '<a href="'.get_term_link($term->slug, 'mytaxonomy').'">'.$term->name.'</a>,'
- $terms = get_the_terms( $post->ID , 'your_custom_taxonomy' );
- foreach( $terms as $term ) {
- print $term->name;
- break;
- unset($term);
- }
- $terms = get_the_terms( $post->ID, 'sitecat' );
- $first_term = $terms[0];
- echo $first_term->name;
- $first_term = get_the_terms( $post->ID, 'TAXONOMY_NAME' )[0];
- var_dump( $first_term );
- $first_term_name = get_the_terms( $post->ID, 'TAXONOMY_NAME' )[0]->name;
- var_dump( $first_term_name );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement