Skip to content

Instantly share code, notes, and snippets.

@morenojavier
Last active October 20, 2017 14:26
Show Gist options
  • Save morenojavier/8bf5dbcb16ea87914d7e3608b7f599a0 to your computer and use it in GitHub Desktop.
Save morenojavier/8bf5dbcb16ea87914d7e3608b7f599a0 to your computer and use it in GitHub Desktop.
Wordpress: Tags con separador para blog.
<?php
$tags = get_the_tags();
if( $tags ) :
echo '<p class="taxonomy"><span class="tag-title">'.__('Tags: ', 'warp').'</span>';
foreach( $tags as $tag ) {
$names[] = '<span class="'. $tag->slug .'"><a href="'. get_tag_link($tag->term_id) .'">'. $tag->name .'</a></span>';
}
echo implode(' , ', $names ) .'</p>';
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment