Created
          June 22, 2021 12:29 
        
      - 
      
- 
        Save annelyse/c2713d60bf13f5177d37708791ba2b38 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or 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
    
  
  
    
  | <?php | |
| // Displays comma separated taxonomy terms. | |
| function entry_terms() { | |
| $terms = get_the_terms( get_the_ID() , 'tags-name' ); | |
| if ( ! empty( $terms ) ) { | |
| echo '<p class="entry-meta"><span class="entry-terms">'; | |
| foreach ( $terms as $term ) { | |
| $entry_terms .= $term->name . ', '; | |
| } | |
| $entry_terms = rtrim( $entry_terms, ', ' ); | |
| echo $entry_terms . '</span></p>'; | |
| } | |
| } | |
| entry_terms() | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment