Skip to content

Instantly share code, notes, and snippets.

@chrillep
Forked from paulc010/tw-wp-post-tags.php
Last active August 29, 2015 14:02
Show Gist options
  • Save chrillep/db6354cc85d1f81efbbc to your computer and use it in GitHub Desktop.
Save chrillep/db6354cc85d1f81efbbc to your computer and use it in GitHub Desktop.
Font-awsome icons if post has feed tag and "social media" tag
<footer>
<?php
if (get_the_tags()) $posttags = get_the_tags();
if ($posttags) {
$tagging = '';
foreach($posttags as $tag) {
if ($tag->slug != 'feed') {
$tagging = $tagging . '<i class="fa fa-'.$tag->slug.'-square"></i>';
}
}
}
?>
<?php echo $tagging; ?>
</footer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment