Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $categories = get_the_terms($post->id, 'project-type');
- $separator = ', ';
- $output = '';
- if($categories){
- foreach($categories as $category) {
- $icon = iconize_get_term_icon_by('name', $category->name, 'project-type');
- $output .= '<a href="'.get_term_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$icon.$category->name.'</a>'.$separator;
- }
- echo trim($output, $separator);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement