Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Tag shortcode

By: supportnwl on Nov 4th, 2012  |  syntax: None  |  size: 0.69 KB  |  views: 52  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function em_tag_list(){
  2.  $tags = get_terms(EM_TAXONOMY_TAG,'hide_empty=0');
  3.  echo "<ul>";
  4.  foreach ($tags as $tag) { //$tag->name
  5.   echo '<li><a href="' . get_term_link( $tag->name, EM_TAXONOMY_TAG) . '">' . $tag->name .'</a></li>' ;
  6.  }
  7.  echo "</ul>";
  8. }
  9. add_shortcode('tag_list', 'em_tag_list');
  10.  
  11. //USAGE: [tag_list]
  12.  
  13. ===================================================================================
  14.  
  15. add_filter('em_tag_output_placeholder','my_em_placeholder_tag_mod',1,3);
  16. function my_em_placeholder_tag_mod($replace, $EM_Tag, $result){
  17.         if ( $result == '#_TAGNOTES' ) {
  18.                 $replace = $EM_Tag->description;
  19.         }
  20.         return $replace;
  21. }
  22. //USAGE: #_TAGNOTES at event > formatting > event tags