Skip to content

Instantly share code, notes, and snippets.

@jeherve
Created May 15, 2012 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeherve/2704731 to your computer and use it in GitHub Desktop.
Save jeherve/2704731 to your computer and use it in GitHub Desktop.
[Quora] How do I insert a rel=author into my get_the_tags call in WordPress?
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo '<a rel=author href="' . $tag->slug . '">' . $tag->name . '</a>';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment