WordPress Tags Tutorial
How to manage tags in WordPress
Tags are one of the ways to organize the posts/articles on your WordPress site according to some shared topic or anything that the different posts may have in common. You can associate a post with one or more tags, and many posts can be assigned to the same tag. Tags are similar to categories, but unlike categories they cannot be organized into a hierarchical structure; there are no sub-tags. For information on categories check out the tutorial on WordPress categories.
On the frontend the tags associated with a post are usually displayed under the content of the post. This, however, is theme-specific. In some themes the tags are listed under the title of the post. The tags are links and when a visitor clicks on a tag, the tag archive page of that particular tag is displayed. This page lists all the posts associated with the tag.
Tags can be managed from the admin panel of your WordPress. In the first section of this tutorial we'll describe the settings on the general Tags page in the admin panel, and in the second section we'll go over the settings on the form for adding and editing tags.
Tags Section in the Admin Panel
To manage tags, after you log in to the admin panel of your WordPress go to Posts menu>Tags sub-menu. The page that opens is divided into three areas. In the top left corner are listed the popular tags; this area is present only if you have added any tags. Below it is the add form for new tags. On the right side of the page there is a table listing the existing tags:
The more popular tags, those that are assigned to more posts, are listed in the section with the popular tags with bigger letters. Each tag in that section is also a link which redirects to the edit form for that tag.
We'll review the add/edit tag form in the next section of this tutorial.
On the right side of the page there is a table that displays the existing tags. The table is divided into a few columns showing the respective information for each tag: Name, Description, Slug, Posts (the number of posts associated with the tag).
The name of each tag in the table is also a link to its edit page. The number of posts per tag shown in the table is a link too. When clicking on a number it will redirect you to the Posts page in the admin panel and in the table on that page only the posts associated with that tag will be listed. For more information on the slug and description options read the next section of this tutorial.
You can hide and display any of the table columns. The only exception is the Name column which cannot be removed. To hide/show columns, click on the Screen Options button in the top right corner of the page and mark/unmark the respective checkboxes:
The screen options also give you a chance to change the number of tags displayed per page in the table.
From the table you can perform various other actions with the tags. With the help of the Bulk Actions drop-down menu (there's one above the top left corner and another one below the bottom left corner of the table) you can delete many tags at the same time. To do this mark the checkbox that's in front of the name of each tag you want to delete, select Delete from the Bulk Actions drop-down menu and click on the Apply button next to it:
There are actions you can perform with each individual tag. When you hover the mouse pointer over a table row some buttons will show up under the name of the tag:
With the Delete button you can delete the particular tag. If you click on the View button, the tag's page on the frontend will be displayed. That's the page showing all the posts to which the tag is assigned. The Edit button will display the edit form on which you can configure all the options of the tag. The Quick Edit button will expand a small panel in the table from which you can change the name and slug of the tag:
Adding and Editing Tags
To add a new tag, in the admin panel go to Posts menu>Tags submenu and use the add tag form that's on the left side of the page. The table with the existing tags is on the same page. To edit a tag either click on its name in the table, or hover the mouse pointer over its row in the table and click on the Edit button:
The add and the edit tag forms have the same settings:
- Name - type the name of the tag as you want it to be shown on the frontend. You can use upper and/or lower case letters. The name of a tag can consist of more than one word.
- Slug - the slug is the part of the URL of the tag that corresponds to the name of the tag. If you leave this field empty, the name of the tag will be used automatically as the slug. The system will automatically turn uppercase letters into lowercase ones, and it will separate words with hyphens. For example, if the name of the tag is HostKnox Tutorials and you leave the slug field empty, the system will automatically create the slug hostknox-tutorials.
Note that unlike posts and categories, the slug of the tag is used with the default URL structure even when pretty permalinks are not used. For instance, if we use our example tag, its URL with the default URL structure will be domain.com/?tag=hostknox-tutorials. If from the settings of the tag we change the slug to hostknox-knowledgebase, then the URL of the tag will be domain.com/?tag=hostknox-knowledgebase. In case we use pretty permalinks, depending on the URL structure that we choose, the URL for the same tag may be domain.com/tag/hostknox-tutorials (hostknox-tutorials being the slug). For more information on permalinks check out the tutorial on WordPress permalinks. - Description - this is also an optional field. If you want to, you can type a short description of the tag. The description is displayed on the frontend at the top of the tag archive page listing all the posts belonging to that tag. Some themes don't display the tag description.
After you're done with the settings just click on the button Add New Tag. If you're editing a tag the corresponding button will be labeled Update.