Reputation: 589
I would like to show a list of tags on a post but without a link on the tag. Right now I use:
<?php the_tags( '<li>', ', ', '</li>'); ?>
How do I strip the link from the tag?
Upvotes: 1
Views: 9268
Reputation: 3880
From the Wordpress Codex:
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo $tag->name . ' ';
}
}
?>
Upvotes: 6