1

I've searched Google and I can't seem to find what I hope to achieve. I'm trying to display the tags without the hyperlink, that is this:

<a href="blalblalba.com/tag/tagname/">tagname</a>

becomes this:

tagname

Is this even possible?

1 Answer 1

1

get_the_tags codex page says

The following example displays the tag name of each tag assigned to the post (this is like using the_tags(), but without linking each tag to the tag view, and using spaces instead of commas):

<?php $posttags = get_the_tags();
if ($posttags) {
  foreach($posttags as $tag) {
    echo $tag->name . ' '; 
  }
} ?>

ever tried that? :)

3
  • damn, didnt see that i was using the_tags, ah well thank you very much Commented Mar 28, 2015 at 1:25
  • You're very welcome mate. We all have our blind spots ;)
    – jimihenrik
    Commented Mar 28, 2015 at 1:26
  • so true, especially when you get tired! take care and happy coding :D Commented Mar 28, 2015 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.