In a few recent client projects, I’ve had the need to display WordPress tags without links. Sure, this is relatively easy to do with a `foreach` loop, but I got tired of writing the same code.

So I decided to write a simple plugin that makes it way to display the tags without links.

WordPress Tags Without Links

Just as the GitHub repository homepage reads:

This plugin makes it easier for developers to display WordPress tags without links associated with them.

The purpose of the plugin is to provide developers an easy way to render tags without the tags actually having been linked. It also uses the standard conventions for WordPress functions:

  • the_tags_without_links will echo the list of tags associated with the given post using the default separator (which is a space)
  • get_the_tags_without_links will return the list of tags associated with the given post using the default separator, but will not echo it to the current template
  • Both functions also accept an optional parameter for defining your own separator

It’s simple, but I’ve used it in enough projects that I’ve found it useful, so I thought it made sense to release it as a plugin.

The plugin is obviously open source, is not available in the WordPress Plugin Repository, and is open for contributions. Check out the README, grab the current version from GitHub and feel free to contribute, as well.