Primarily coming as a basic publishing platform, WordPress allows you to create and manage your content in an effective way. As a WordPress site owner, you definitely understand categories, tags, taxonomies, and how to use them to group and organize your related blog posts together.
It’s simple and straightforward to create or make changes to your WordPress categories. You can easily add new categories, create sub-categories, change the default ones, or even modify the category order. Apart from these fundamental tasks, there are a lot more you can do with the WordPress categories that you might not know about.
Have you ever heard of category icons or subscriptions on category pages? Guess what! Most people have never realized that they can definitely take these actions to customize their content categories.
In this article, we’ll go into extra guides on how to edit and optimize your WordPress categories. Before we begin, let’s quickly take a look at the benefits of assigning categories to your content.
Why using WordPress categories
You don’t have to be a WordPress expert to understand the benefits of categories. Here are the 2 most common cases that WordPress site owners find when setting a category for their posts.
Use WordPress categories to organize the content better
As mentioned, categories prove convenient to sort out your posts. Imagine that you’re landing on a blog where all articles are displayed without any order, you probably don’t intend to scan through it anymore.
Categories help create a better site structure. Besides the main category, you can add sub-categories for it. To take one example, you have a blog about WordPress with 3 categories: Plugins, Themes, Tutorials. For the Tutorials one, it’s necessary to sort articles out into Security Tutorials, SEO Guides, and so on.
This makes it simpler for readers to look for your content and increase the user experience. They can release the headache caused by looking for the related content in an endless list of articles.
Use WordPress categories for SEO benefits
Unlike tags and other taxonomies, categories bring more values to your website in terms of Search Engine Optimization. With a better site structure, Google bots find it easy to crawl and index your website.
On top of that, you can increase site ranking via keyword-rich categories. Instead of providing random category names, why don’t you target trending and high volume keywords when titling them? If category pages are optimized properly, they’ll get ranked at high positions in a short period of time.
What’s more, the time on site also affects your blogs’ positions on search results. After reading an interesting post, visitors tend to look for related articles for more information. The longer they stay on your site, the lower the bounce rate you’ll receive. Appropriately, Google trusts you more.
You have had better ideas on how powerful WordPress categories are now. It’s time to dig into advanced guides such as allowing users to subscribe categories, adding category icons, creating templates, or password protecting all posts in a category, and more.
How to password protect WordPress categories
Locking a page, post, or custom post type shouldn’t take you a lot of effort since WordPress already builds a default feature right in the edit screen. You can generate a password to block unwelcome users from viewing your private content within seconds.
How about password protecting a whole WordPress category? It requires you to install a plugin specially designed for this demand. Password Protect WordPress Pro authorizes you to set passwords for your WordPress categories. Once protected, all posts under that category will become private too.
Here is how to use the plugin to secure all posts in a category:
- Download, install and activate the PPWP Pro plugin
- Visit your category list page under the Posts section
- Check the Password protected? box
Every article in your category is covered with a password form now. Users have to enter the correct password to unlock it.
How to allow users to subscribe to categories in WordPress
WordPress enables RSS feed for each category. You can search for it when adding /feed/ to the category URL, for example, https://www.passwordprotectwp.com/category/private-site/. This page lists out all content in your category. Once a new post is published, the post’s link will be updated automatically in the RSS feed too.
If users subscribe and receive this RSS feed URL, they can easily access all your related articles with ease. The following steps instruct you to add a subscribe link to your category page:
- Head to Appearance → Theme Editor in your WordPress dashboard
- Look for the category.php file. Find the archive.php if there is no category.php file there
- Add this code to the file where you intend to display the subscription link. It’s best to place it before the loop.
<?php $category = get_category( get_query_var('cat') ); if ( ! empty( $category ) ) echo '<div class="category-feed"><p><a href="' . get_category_feed_link( $category->cat_ID ) . '" title="Subscribe to this category" rel="nofollow">Subscribe</a></p></div>'; ?>
This is what users will see when accessing your category page.
How to Add Category Icon in WordPress
WordPress doesn’t permit you to set an image for a category. You have to seek help from a third-party plugin to achieve this. Taxonomy Images plugin turns out to be one of them.
Take these 5 simple steps to get started with the plugin:
- Go to Plugins → Add New and search for “taxonomy images”
- Upon installation and activation, click the Taxonomy Images option under your WordPress Settings page
- Tick the Categories box under the Taxonomies Settings section and save your changes
- Go to the Categories list page and you will see a new Image column next to each category
- Click on the question mark and add your own icon
How to Create Category Templates
It’s possible for you to create a custom category template so that your category pages will look special and unique. Having all categories following a template is an easy task. What if you plan to differentiate some of them from others?
Let Custom Category Templates plugin handle that. All you need to do includes:
- Log into your WordPress root directory and find the category.php file in the theme folder
- Copy all the content
- Create a new category template file with a meaningful name that starts with “category-” and ends with a “.php”
- Paste the copied content into the new file
- Enter the code below to the top of the file
<?php /* * Category Template: Banner */ ?>
- Edit your new category template by displaying a banner or adding a custom column
A new category template is generated now. Whenever you create a new category or edit an existing one, there will be an option for you to decide a template for that category at the bottom of the page.
Make Use of Your WordPress Categories
Categories are the perfect solution to sort out your content and group related posts together. It makes your site more well-organized and increases the user experience. WordPress categories also assist you in boosting the website SEO and increase rankings by targeting high-value keywords and optimizing properly.
There is much more you can do with your categories, besides basic tasks like creating new ones, setting default categories, or removing uncategorized categories. You can password protect all posts under a category automatically, allow users to subscribe to your category, or even add an icon for it.
Have any questions on how to maximize your WordPress categories? Let us know in the comment section below.