Advertisement
Guest User

get_terms

a guest
Dec 20th, 2011
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. <?php
  2.    
  3.         $terms = get_terms("tribe_events_cat");
  4.         $count = count($terms);
  5.         if ( $count > 0 ){
  6.             echo "<ul>";
  7.             foreach ( $terms as $term ) {
  8.               echo "<li><a href='/category/" . $term->slug . "'>" . $term->name . "</a></li>";
  9.                
  10.             }
  11.             echo "</ul>";
  12.         }
  13.    
  14.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement