How to Add Categories and Tags for WordPress Pages?
Categories and Tags are used to group similar posts /pages and provide a better user experience for the viewer. Categories are almost like tags but are used for broader grouping. In general WordPress support Categories and Tags, but the feature might not be available this goes back to the theme you are using. If your WordPress theme does not include Tags and Categories for pages, here are three ways to help you add Tags and Categories to your word press pages.
- How to Add Categories and Tags for WordPress Pages Using a Plugin
- How to Add Categories and Tags for WordPress Pages Without Using a Plugin
- Alternative Way to Add Categories and Tags for WordPress Pages
-
How to Add Categories and Tags for WordPress Pages Using a Plugin
The easiest and fastest ways to add categories and tags is by using a plugin (no coding experience needed)
- Login To Your WP Dashboard.
- Go to Plugins and then, Add New.
- Search , Install and activate the Post Tags and Categories for Pages plugin
Once activated, navigate to Pages > Categories and you will find post categories and tags now available for your pages.
-
How to Add Categories and Tags for WordPress Pages Without Using a Plugin
In this method we will hard code the Tags and Categories into WordPress without using plugins.
- Login To Your WP Dashboard.
- Go to Appearance and then, Editor.
- Navigate to
functions.php
- Add the following snippet in your theme’s
functions.php
then save your changes
function add_categories_to_pages() {
register_taxonomy_for_object_type( 'category', 'page' );
}
add_action( 'init', 'add_categories_to_pages' );
To add tags taxonomy in your page, add the following code in your functions.php
function add_tags_to_pages() {
register_taxonomy_for_object_type( 'post_tag', 'page' );
}
add_action( 'init', 'add_tags_to_pages');
Once you have successfully added the above Codes, your back-end page layout should look like the image below
-
Alternative Way to Add Categories and Tags for WordPress Pages Using a Plugin