Updated on Jan 23, 2025
The next section in the Craft CMS dashboard is Categories. In Craft, a Category is a content element used to group other content elements within itself (entries, for example). For example, blog posts organized by topic: all the entries that make up those blog posts would be in the same Category. Here are the three key features that define Categories in Craft.
To give an example with a real-world equivalent, you can think of a Category as a cargo ship and Entries as the containers on that ship. Additionally, Categories belong to groups, as we mentioned above. Each group has a set of options defining various Category aspects.
Now that we know what a Category is let us create a few!
Just like Entries, setting up a Category is straightforward. Everything is clearly labeled, and the process is easy. To start, we must create a Category Group. Go to Settings> Categories and click on +New Category Group. There, you will see all the fields we mentioned above.
Fill in the fields and save your new Category Group. It is time to populate the group with some actual Categories! Go to Categories from the menu to the left, select the specific group, and click +New Category.
Once you have filled in the fields you selected when creating the group, you can click +Choose under Parent to assign a parent category to the one you are creating currently. Once you are all set, click Create Category. That will take you back to the list, where you will find all your Categories and their subcategories.
And that is it! If you would like to edit a Category, simply select it with the box next to it and click the cogwheel drop-down menu that appears. You will find many options in it, one of which is to edit the Category. Next, assigning Categories.
Assigning Categories requires the creation of a Category Field. We will elaborate on Fields later, but for the purposes of the Categories section, we will take a brief detour! Go to Settings > Fields, then click +New Field.
Fill in the fields and make sure you select Categories as the Field Type, and pick the correct Source. You can enable Maintain Hierarchy if you want the structure of the related Categories to be maintained. When you are ready, click Save. You can add a Category field when you create your Entry Types or edit an existing one. Then, when you go to create a new Entry you can choose which Category it goes to.
As you can see, adding a Category to an Entry is as easy as selecting it. Now, it is neatly stored away in the correct Category. Simple and straightforward! With this, our section on Categories is concluded. Next up is Assets!