Advertisement
imranmodel32

custom texonomy on div class unlinked for isotope

Feb 8th, 2014
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. // unlink category for portfolio category on div class
  2. function ar_texos_unlinked(){
  3. $terms = get_the_terms( $post->ID, 'ar_portfolio_cat' );
  4.  
  5. if ( $terms && ! is_wp_error( $terms ) ) :
  6.  
  7. $draught_links = array();
  8.  
  9. foreach ( $terms as $term ) {
  10. $draught_links[] = $term->name;
  11. }
  12.  
  13. $draught_links = str_replace(' ', '_', $draught_links);
  14.  
  15.  
  16. $on_draught = join( " ", $draught_links );
  17. $on_draught = strtolower($on_draught);
  18.  
  19. endif;
  20.  
  21. echo $on_draught;
  22. }
  23.  
  24. // use
  25. <?php ar_texos_unlinked(' ');?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement