What are WordPress Tags and how can I use them?

Tags are a means to add additional clarity and filtering to a website post.

Tags are cross-category they can therefore be thought to be horizontal. Whilst categories are considered to be vertical.

Whilst categories can be rigid in their grouping, posts from different categories can have the same tag.

Tags can be used to offer additional grouping. Also it’s possible to present items with the same tag as related posts a “you may also be interested in…”

Consider an historic castle used as an hotel, with gardens and a restaurant. It may simply belong to a category of hotel. A post on a tourism website may incorporate tags to better refine searches and offer similar properties from other categories. The assigned tags could be:

  • hotel
  • weddings
  • restaurant
  • events
  • gardens

Search results for gardens could incorporate the hotel along with garden venues from within the same geographic area. Shown alongside the posting could be related venues: gardens; restaurants; and wedding venues taken from across categories referenced by matching tags. Along with other hotels shown based upon same category.

When editing a WordPress post the option to add tags is found in the post tab on the right hand settings column menu. Scroll down to find this section.

To add a tag to the post start typing within the box. As you type best matching existing tags will be offered as a drop down selection. If the tag already exists click on the suggested entry to add. If it doesn’t exist complete your typing and press return. to add the new tag. Take care adding new tags it’s easy to unintentionally create the same word with and without capitals, for example trees and Trees.

To manage the tags, deleting duplicates and entering a number of new ones. Looking at the vertical black menu on the left of the screen there’s a tags menu option located within the posts section.

WordPress pages don’t have the option to set tags by default. To enable pages to operate with tags add the following snippet of code to your functions.php file.

function add_tags_to_pages() {
  register_taxonomy_for_object_type( 'post_tag', 'page' );
}
add_action( 'init', 'add_tags_to_pages');

Similarly categories can be added using:

function add_categories_to_pages() {
  register_taxonomy_for_object_type( 'category', 'page' );
}
add_action( 'init', 'add_categories_to_pages' );

Tags transgress categories. allowing posts from different categories to be brought together as a part of a search or as related items of interest.