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 );
  2.  
  3. // typically
  4. echo get_the_term_list( $post->ID, 'video_tag', 'Tags: ', ', ', '.' );

URL: http://codex.wordpress.org/Function_Reference/get_the_term_list

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.