Getting the Most from WordPress Categories

Getting the Most from WordPress Categories

Choosing a category, before hitting the publish button on a new post, is about as far as most people get with this feature of WordPress. However, there is so much more that can be done with categories in order to make your site function better while also making it easier for your readers to find more of your content.

Today we are going to cover some interesting ways to work with categories. This includes things like creating custom category archive pages, applying templates to category pages, allowing subscription to individual categories, adding images to categories and displaying a list of posts from a particular category.

Creative WordPress Categories

WordPress taxonomies such as categories are ideal for cataloguing your content. But they can also be used to retrieve, display and customise your posts on a more granular level than can be achieved by installing a site wide theme such as a WordPress template. Here are some ways you can work with categories to make your site more dynamic and easy to navigate.

Create Custom Category Pages

Category pages, which are pages on your site that simply display the posts from an individual category, can often be pretty plain affairs. But by installing a free plugin you can begin creating your own custom category pages.

Once installed, the WP Custom Category Pages plugin allows you to create content that will be displayed at the top of your category pages. This feature must be activated on an individual category basis, which is quite handy as it means it will only be applied to the categories of your choosing.

Categories Custom Page

Once you’ve enabled a custom category page, you can then enter a headline, a page title and the text to be displayed on the page. As the plugin uses the WordPress post editor, you can add as much content as you like, using all the regular features of WordPress content creation including formatting text, inserting images and video and adding links.

Categories Custom Page 01

Your category pages will now have had a makeover and feature their own unique content. This should help them rank in the search engines better than the default category pages, and when you consider that this plugin was developed by one of the Distilled team, you can see why. After your custom text, the plugin then lists the posts from that category using just their post titles by default.

Apply Templates to Category Pages

As well as creating custom category pages with the above plugin, you can also apply templates to your category archive pages. Although these templates don’t apply to the posts in a category, they do apply do the archive category pages which list the posts in that category.

While you can automatically apply your templates to categories by giving the templates the same name as the category, this would mean creating an individual template for each category. As this isn’t always the best idea, you can use the free Custom Category Templates plugin to help overcome this.

To benefit from this plugin, you will have to ensure you’ve created at least one category template. To do so, simply go to your WordPress admin dashboard and visit Appearance > Editor. Now might also be a good time to create a child theme.

From here, copy the contents of the category.php file and then paste it into a new file in Notepad and name it category-yourname.php where yourname is your chosen name of the template. After that, enter the following code to the very top of the template file:

<?php
/**
* Category Template: Grid
*/
?>

After that you can then edit the template file to include any of the specific template contents you might want to add, such as any images or you can begin editing the layout. Once you are done, upload the file to your (child) theme folder.

Once the plugin has been activated and you’ve created at least one category template, you can then edit a category and choose the template for its archive page from a dropdown list of the available options.

If your site was about animals and you had a few categories related to dogs, you could insert an image into a template file of some dogs and then apply that template to all your categories that relate to dogs.

Let Users Subscribe to a Specific Category

If your site covers a range of topics, you have to accept that some of them won’t be of interest to all of your readers. Instead of letting this put readers off from subscribing to your content, you can make it much more enticing by allowing them to choose which categories to subscribe to.

For RSS subscriptions, thankfully this can be easily achieved using the free Category Specific RSS Feed Subscription plugin. Once installed, your readers now have the option of subscribing to the categories of their choice, instead of everything that gets posted to your website.

For email subscriptions, the Post Notification plugin, which while not being actively maintained, still works with WordPress 3.7, is a good option. Unlike the very popular Subsribe2 plugin, Post Notification allows readers to subscribe to the categories of their choice without the need to first become a registered user of your site.

Add Category Images

Just as you can add a featured image to a post, you can also do the same for categories. This means your categories get a visual signifier, as well as the default text-based name. This is ideal for sites that want to let users browse their content using categories. By using a category image, the user will be given a visual clue of what the category relates to.

For example, a site about dogs might have different categories for each breed. While the breed names are helpful, an image of the breed can be of even more help to the user.

Categories Featured Image

By using the free Featured Images for Categories plugin you can quickly and easily assign images to categories and tags. Once you’ve done that, you can then use the included shortcode to display those images in a post, each of which links to the different categories. This allows you to create a menu using the images to help encourage your readers to click through to more pages on your site and find exactly what they are looking for.

The plugin also comes with widgets that display the category images for creating attractive sidebars. There is also an affordable pro version available which gives you more control over how the images are displayed, as well as being able to add images to custom taxonomies.

Display a list of Posts from a Category

By using a simple free plugin it is possible to output a list of all or some of the posts from a specific category. This is useful if you are covering a particular topic in a post or page and then want to display a list of links to more posts from a related category. For example, this article includes lots of plugins, so I could then display a list of 10 posts from the plugin category on this site, for further reading.

By using the List Category Posts plugin I can display a list of posts from a specific category, all of which are clickable links that take the user to that article. The plugin uses shortcodes so it’s simply a case of entering the required text into a post or page and then the list will be generated. The plugin also includes a widget for listing posts in the sidebar of your site.

Categories Post List

There is also another plugin that enables this feature but also has a few more tricks up its sleeve. That is the WP Category Posts plugin and this one allows you to output more visually rich lists which can include formatting and the post’s featured image. It also includes multiple widgets for your sidebars.

Posts Per Cat is another free plugin that displays a list of posts, but this time from multiple categories, with the posts from each category listed under their own header.

Link to a Category from the Menu

Another tip for making it easy for your readers to find all the posts from a particular category, is to create a new menu item for one or all of your site’s navigational systems. This approach is very simple and can be done in just a few clicks of the mouse:

  • Login to WordPress and go to Appearance > Menus
  • Click on the Categories submenu (if you can’t see it, click on Screen Options in the top right corner)
  • Select the Category you want to link to and click Add to Menu

Now there will be a new menu item that when clicked, takes you to the category archive page. You can also nest the categories to create a dropdown menu that lists multiple categories.

Conclusion

Hopefully these tips for working with categories in WordPress have given you some ideas on how you can further optimise your site for SEO, increase the number of page views from each visitors and generally display your content more effectively.