Add categories (categories) and tags (tags) to pages (pages) in WordPress in a simple way.
Let’s temporarily ignore the reason why the page has no categories and tags. If you are looking for a simple solution to integrate categories and tags for pages in your WordPress website, then this is the article for you. With just a few lines of code or a super lightweight plugin, you can add these two types of taxonomy to your page, similar to a post. The methods all have the same effect and absolutely do not affect the web load speed, so the choice of method is up to you.
Explore more:
Table of Contents
Add category and tag to the page with code
You can optionally add a category, add a tag or add both types of taxonomy at the same time:
Add category
Insert the following code into the file functions.php
of the theme or child theme you are using. You can also insert it via plugin Code Snippets to avoid the code being deleted when upgrading the theme.
Save and check the results.
Add tags
Insert the following code into the file functions.php
of the theme or child theme you are using. You can also insert it via plugin Code Snippets to avoid the code being deleted when upgrading the theme.
Save and check the results.
Add category and tag for page with plugin
All you need to do is install and activate a plugin called Pages with category and tag (download).
This plugin has no settings so you don’t need to set anything. It only includes a few lines of code, so it is very light and will not affect the loading speed of the website.
Check the result
This is the default page admin interface:
And here is the result after adding the category and tag:
You can completely create new categories and tags and assign them to the same pages as for posts:
It’s great, isn’t it? Good luck!
If you liked this article, follow my blog to regularly update the best and latest articles. Thanks very much. 🙂