Saturday, June 30, 2018

Categories, Tags, and Taxonomies in WordPress


When I upgraded my Hedden Information Management website to WordPress a few months ago, I took advantage of WordPress’s blog post feature and incorporated a copy this blog into the website (while also keeping its original location on Blogger.com). The difference between categories and tags in the different platforms became clear. Blogger.com offers only “labels” to its bloggers, although these are listed as “Categories” on the displayed blog. WordPress, by contrast, offers both “Categories” and “Tags.”  When I imported my blog posts to the WordPress site, the Categories in Blogger.com became Categories in WordPress, but none of the posts had any Tags. I then realized that some of these Category terms perhaps should be changed to Tags.

The difference between Tags and Categories is a topic I blogged on five years ago.  A simple comparison is that Categories tend to be broader than tags, and more documents get assigned the same Category, whereas Tags tend to be more specific with fewer documents assigned the same Tag. Conversely, a document typically has only one or two Categories but more Tags.  Categories can also be organized into a hierarchy with subcategories, but Tags tend to be unstructured.  However, Blogger.com does not offer the capability of putting its Categories into a hierarchy, which would be desirable, since the number of my Categories has become too great to browse easily in a flat list.

WordPress appropriately treats Categories and Tags in differently in the following ways:
  • Categories, unlike Tags, have the capability of being put into a hierarchy, be selecting a “parent” Category for a given Category. The hierarchy displays both in the Dashboard and optionally on the site.
  • While both Categories and Tags are displayed on each individual post (and are hyperlinked to a list of posts which share the same Category or Tag), and both Categories and Tags that can be generated as Tag Clouds, it is only the Category list that can be alphabetically browsed by the site visitor (if added as a widget to a page).
  • Categories are required, whereas Tags are not. If you don’t assign a Category to a post it will automatically get assigned the “Uncategorized” Category.
  • Category labels appear additionally within the default URL of the blog post in a file path between the domain name and the filename. For example, my blog post with the Category of “Metadata,” received the URL of www.hedden-information.com/metadata/metadata-and-taxonomies.
  • The Category name also appears within the breadcrumb trail, if the site has one displayed on each page. Of course, some blog posts have multiple Categories, and only one of them can appear within the URL and breadcrumb trail, so WordPress assigns one of them by default.

Creating and managing Categories and Tags for posts is a default feature of WordPress that’s easy to do in the Dashboard of a site. Since I had recently imported dozens of blog posts that had Categories and no Tags, I especially liked the feature to selectively convert Categories to Tags (One can also convert selected Tags to Categories.)  I went through my list of Categories and converted most of those that were infrequently used into Tags. The Categories to Tags Converter is one of the default Tools available for Import, but it does need to be “imported” and “activated” to be available.

Additional features in taxonomy management in WordPress can be obtained through various free or premium plugins. This is the case if you want to create multiple taxonomies, whether as sets of Categories or Tags, or faceted taxonomies. The default Categories and Tags feature permits the creation of just a single Category set and a single Tag set. If your site has different types of posts, such as custom post types, or if you want multiple term sets by which to filter posts by different aspects (facets), then you would need to create custom taxonomies. It is possible to create custom taxonomies by writing code, but if you are not a WordPress developer, there are plugins available for creating custom taxonomies. The support of synonyms/alternative labels/nonpreferred terms for Tags is also a feature available only with plugins, in this case plugins that aim to support search.

I will be discussing these topics in a presentation “Taxonomies,Categories, and Tags” at the WordPress conference, WordCamp Boston 2018, on Saturday, July 21. If you are in the Boston area come join me!

No comments:

Post a Comment