Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <?php
  2. # show categories
  3. $categories = get_the_term_list( $post->ID, 'ev_categories', '<p>', ', ', '</p>' );
  4. $categories = strip_tags( $categories );
  5. echo $categories;
  6. if ($categories <> '') echo '<div class="clear"></div>';
  7. ?>
  8.  
  9. ?php
  10.  
  11. # show categories
  12. $categories = get_the_term_list( $post->ID, 'ev_categories', '<p>', ', ', '</p>' );
  13. $categories = strip_tags( $categories );
  14.  
  15. if ( strpos($categories,'arts and culture') !== false ) { $catID = 1; };
  16. if ( strpos($categories,'business') !== false ) { $catID = 2; };
  17. if ( strpos($categories,'community') !== false ) { $catID = 3; };
  18. if ( strpos($categories,'education') !== false ) { $catID = 4; };
  19. if ( strpos($categories,'sport') !== false ) { $catID = 5; };
  20.  
  21. <?php
  22.  
  23. # show categories
  24. $categories = get_the_term_list( $post->ID, 'ev_categories', '<p>', ', ', '</p>' );
  25. $categories = strip_tags( $categories );
  26.  
  27. if ( strpos($categories,'arts and culture') !== false ) { $catID = 1; };
  28. if ( strpos($categories,'business') !== false ) { $catID = 2; };
  29. if ( strpos($categories,'community') !== false ) { $catID = 3; };
  30. if ( strpos($categories,'education') !== false ) { $catID = 4; };
  31. if ( strpos($categories,'sport') !== false ) { $catID = 5; };
  32.  
  33. # show locations
  34. $locations = get_the_term_list( $post->ID, 'ev_locations', '<p>', ', ', '</p>' );
  35. $locations = strip_tags( $locations );
  36. #echo $locations ;
  37.  
  38. $categories = get_the_term_list( $post->ID, 'ev_categories', '<p>', ', ', '</p>' );
  39. $categories = strip_tags( $categories );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement