What is the difference between categories and tags?

 

The deep dark secret is that there isn’t really a difference. They look a little different, and some code makes them behave differently, but at the core they are the same. In this video I’ll show you the subtle differences.


This tip was sponsored by OSTraining.com! OSTraining aims to explain websites so clearly that anyone can understand, with jargon-free, hands-on training that clearly defines processes to simplify complex tasks. OSTraining offers online courses, best-selling books, onsite training, and online live training.

More than 100,000 students have learned website development through OSTraining. OSTraining courses focus on web development and the tools around it, including WordPress, WooCommerce, Drupal, Magento, and Joomla.


Trascription

Hey folks! Welcome to another HeroPress Tip of the Week. This week we’re going to take a look at the difference between categories and tags in WordPress and this may surprise you but the deep dark secret is there is no difference.

In the database they are stored exactly the same the user interface is the same. Categorie. This is tags. Everything is the same the only difference is there’s a little code to make them behave differently on the front end of the site. And the primary difference there is that categories are hierarchical which means you can have a parent-child relationship for example here in my categories I have a category called word camp and underneath it are two Pune and WordCamp US and you can tell by this little Dash that it’s a child of WordCamp.

Tags don’t do that so here we are and you’ll see that I don’t have any children here at all you can also see that difference on a post over here on the right here are my categories and you can see Pune and WordCamp US are indented now I said the the biggest difference is how they appear on the front end with categories if you want to pick a past category an existing one you just click the check box with tags this field is always empty when you start and it shows most use and you can click one and it’ll put it in there.

But otherwise you would just type something

and press comma and then it’s a tag.

That said, it’s talking to the database the same way in the background it just looks a little different here update this post real quick if we go to the front end

Let’s see let’s go back one and view this post

You can see I have categories here but I’m not listing tags on this page anywhere

Oh yes here they are at the bottom underneath related

So you can print them any way you want I could have put tags up here and categories down here categories are hierarchical and tags are not but with just a couple of lines of code you could switch that you could turn off hierarchical for categories and turn it on for tags if you wanted and when you make your own custom taxonomies you get to choose do you want it to act like a category or act like a tag it doesn’t matter the real secret about the difference between categories and tags is that there isn’t one pick which one you like and use it accordingly