Get WordPress Tags/Categories for a Custom Post Type

/ Published in: PHP
Save to your folder(s)

Returns an HTML string of taxonomy terms associated with a post and given taxonomy. Terms are linked to their respective term listing pages.\r\n\r\nThis is for when a custom taxonomy is registered for a custom post type.

Copy this code and paste it in your HTML
  1. echo get_the_term_list( $id, $taxonomy, $before, $sep, $after );
  3. // typically
  4. echo get_the_term_list( $post->ID, 'video_tag', 'Tags: ', ', ', '.' );


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.