Advertisement
mladen16

Untitled

Jan 15th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $categories = get_the_terms($post->id, 'project-type');
  3. $separator = ', ';
  4. $output = '';
  5. if($categories){
  6.     foreach($categories as $category) {
  7.         $icon = iconize_get_term_icon_by('name', $category->name, 'project-type');
  8.         $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;
  9.     }
  10.     echo trim($output, $separator);
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement