Did you know categories and tags in WordPress can be used for pages as well as posts? Adding categories and tags to your website’s pages allows you to organize your website’s content making it easy for users to navigate through it. Password protecting categories and taxonomies enable you to give users controlled access to your content.
Categories and tags can be used to organize and sort your WordPress pages and content to make them more easily accessible to site visitors. However, in a default WordPress site, you can’t add categories to pages - you can only add them to posts.
In some cases, you might want to offer restricted access to some pages on your website. Let’s say you have a blog as well as paid courses. You would want to restrict the pages categorized as courses to the users who have paid for them.
So, in this article, we’re going to show you how to easily create page categories and tags, and how to display and restrict access to them.
But first, let’s look at the difference between pages and posts in WordPress.
What is the difference between posts and pages?
Posts are archived by WordPress since the authors and the time of publication are relevant. This is why the tag and category options are available for posts. They enable users to easily find the information they are looking for within the WordPress archive. Pages on the other hand do not have tags and category options.
Adding categories and tags to pages would be valuable to both your website and the users. So knowing this, what are the benefits of using page categories and tags?
Benefits of using page categories and tags in WordPress
They improve your SEO
Using categories and tags to sort your website content helps to drive organic traffic to your site. Tags resemble the keywords that users perform searches with. When they use these keywords, search engines (mainly Google) are more likely to direct them to your website. This will boost your overall domain authority and Google SERPs ranking.
They improve user experience
Sorting your content makes it more easily accessible and readers can easily navigate through it. They will be able to find the content they are looking for much faster, which reduces bounce rates and improves reader satisfaction. It is also more likely to increase conversions for the clicks that your website is receiving.
Now that you have seen the importance of tags and categories for your pages, when you should use them?
When should you use categories, tags, or custom taxonomies?
Categories in WordPress are used to broadly group related pages. Suppose you sell shoes in a WooCommerce shop, you could have the following categories: men’s shoes, women’s shoes, etc. Within these categories, it is advisable to have sub-categories (for example men’s sneakers), as categories tend to have a hierarchical structure.
Tags on the other hand have no hierarchical structure. They label particular topics within a page. For this reason, it’s common to find multiple tags on a single page. In the above example, you can add tags such as ‘stylish shoes’, ‘budget shoes’, etc. Tags may cut across different categories and sub-categories.
There is another option to create custom taxonomies when you want to group pages in multiple ways, for example, category and department. In a nutshell, use categories for organizing your pages into logical groups and tags to label a particular topic within a page (no hierarchical structure). Finally, use custom taxonomy if you intend to group pages in multiple ways.
The next step after knowing when to use categories and tags for your pages is knowing how you can enable them for your pages.
How can you enable categories and tags for WordPress pages?
The easiest way to enable categories and tags for your WordPress pages is by using a plugin. There are two free plugins that can do this for you: Add Category to Pages or Category Tag Pages. They serve the same purpose, allowing you to quickly add categories and tags to your WordPress pages. The Add Categories to Pages plugin also allows you to generate a list of pages based on categories.
If you intend to group your pages in multiple ways, you’ll need to add custom taxonomies as well as categories and tags.
How to enable custom taxonomies for WordPress pages
By default, WordPress does not allow custom taxonomies which you can use to group your pages in multiple ways. Fortunately, there is a plugin specifically made for this purpose.
Pods – Custom Content Types and Fields is a free plugin that presents a much easier way to enable custom taxonomies for your WordPress pages. It offers a lot of flexibility in the creation and management of custom content. Pods lets you create custom taxonomies and also extend and customize existing taxonomies. It also allows you to organize your content by establishing defining relationships in the relationships fields feature.
To add custom taxonomies to WordPress pages, simply:
- Install Pods.
- Go to Pods Admin > Add New and click 'Create New'.
- On the 'Add New Pod' page, choose 'Custom Taxonomy (like Categories and Tags)' from the Content Type dropdown list.
- Add Singular and Plural Labels.
- Click 'Next Step'.
- Navigate to the 'Advanced Options' tab and scroll to 'Associated Post Types'. Choose the ‘Page’ post type from the list. This will add the taxonomy to your WordPress pages.
- Click 'Save Pod'.
Assign them to the correct pages
Once you enable categories, tags, and custom taxonomies for your WordPress pages, all you have to do is to go to the pages tab to assign your pages to them as needed. Click on the Edit button when you hover on the page title, and select the category/tag/taxonomy you would with the content to belong to. You can also use the Quick Edit button that offers a faster way of doing this.
After organizing your content into categories/tags/taxonomies you would want this information displayed centrally on the front end where the users of your website can easily access it.
How to display categories and tags on your website
Since WordPress pages don’t have categories/tags/custom taxonomies by default, your theme probably won’t display them on the front end. This can be easily fixed by installing the Post Table Pro plugin.
Post Tables Pro lets you:
- Display categories and tags on a table for your users to use to navigate through your website’s content. Instead of adding your data manually, the table is generated automatically using your pages, posts, and custom posts. This table can be a directory, document library, or an index of your pages.
- Use a shortcode to list pages by category or tag, anywhere on your site.
To list WordPress pages in a table, you need to change the post type to ‘pages’ on the plugin settings page. After you have activated your license key, under plugin settings, scroll down to post selection to select pages as the type of content you want to display on the table. On the same page, you can customize the columns you would want to appear on the table.
Categories, tags, and taxonomies are displayed separately in columns for each page, and as drop-down filters above the table. Users can click on these to instantly filter the table by the selected taxon.
How do you choose the posts that appear in the table?
Post Tables Pro offers you a lot of flexibility in determining which pages appear in the table. You have the liberty to use shortcode to display tables depending on the category, tag, taxonomy, etc. You can also choose to hide pages based on various criteria. You can do all this using a simple shortcode, and can find full instructions here.
For example, the shortcode
would create a table listing all pages from the 'Shop Pages' category:
Image Title Summary Categories Author Date
With categories and taxonomies, you’re not limited to just using them to organize your pages and displaying them for your users, there’s a lot more you can do with them. You can restrict access to specific page categories or taxonomies to a given set of users.
How to restrict access to specific page categories or taxonomies
Protecting your categories and taxonomies lets you grant controlled access to your website’s content. The Password Protected Categories plugin allows you to create private areas in your website by hiding categories and taxonomies from users who do not have access.
The Password Protected Categories plugin comes with 3 types of protection for your WordPress page categories:
- Password protection - only people who know the password can access the category or its pages.
- Role protection - logged in users with the correct role can access the category.
- User protection - only specific logged in users can access the category.
You can use Password Protected Categories to protect new categories or existing ones. Everything on the edit/add new category page remains standard. Except this plugin adds a visibility section where you can assign a password to a page category or custom taxonomy.
Under the visibility section, you will need to select one of the protection options. Either enter a password and/or select the roles and users who will have access. All pages assigned to this category will be protected.
If you have assigned a password to the parent category, you do not need to do the same for the sub-categories. Because sub-categories inherit the password protection of their parent category. Password Protected Categories only lets you protect hierarchical taxonomies. So you would need to use categories or custom taxonomies instead of tags.
It’s time to organize your WordPress pages
Adding categories and tags to your WordPress pages allows you to organize your content for your users to easily navigate through it. WordPress does not allow you to add categories and tags to your pages by default. Fortunately, these plugins allow you to do this:
- Add Categories to Pages / Category Tag Pages – to enable categories and tags for your pages.
- Pods (optional) – to create custom taxonomies.
- Post Tables Pro – to display pages in a table with columns and filters for your categories and tags; and to list pages by category or tag.
- Password Protected Categories – to restrict access to specific categories and taxonomies.
You can use these options to create different types of pages for your website such as contact information, testimonials, team members, etc.
Barn2’s plugins (Post Tables Pro and Password Protected Categories) are useful in providing the sort, filter, and instant search options that make user experience and navigation simple and easy.
Click here to get started with Post Tables Pro and ensure that your users are getting the best out of your website.