fbpx
WordPress-how-to-add-categories

How to add a category to WordPress page: WordPress Categories 101

Summary: Learn how to add a category, display pages with a category, customize your WP category page, and other related information.

If you’re interested in learning how to add a category to your WordPress page, you’ve come to the right place. This article will address the following three WordPress category how-tos to simplify your WordPress life:

  • Adding a category and subcategories

  • Displaying pages with a category

  • Customizing a category

If you’re not using Categories with your WordPress sites, you should be. Category is one of the default taxonomies in WordPress (one of those things that everyone uses, but isn’t aware that they’re using it). Don’t worry… it happens to the best of us.

You can use Categories to sort and group your blog posts into different sections. For example, our website has categories for our articles filed under different WordPress topics such as Help, Hosting, and Website. 

Categories help visitors quickly know what topics your website is about and allows them to navigate your site faster. Categories to WordPress are like Tags to Instagram — they’re both incredibly visitor-friendly and quite easy to utilize.

How to add a category and subcategories to a WordPress page

Jack Wallen shows us how to associate Pages to Categories in the new WordPress editor in a recent video. Let’s find out how to add pages to categories in the new WordPress Editor. We’ve transcribed the video below so you don’t have to! 

Create the pages you normally would — and by “normally,” we mean using the new WordPress Editor. Go to the pages listing by clicking Pages in the left navigation of the Admin panel.

Search for the page you just created by typing the page title in the search field. When the page in question appears, hover your mouse over it and click Quick Edit. In the resulting pop out editor, locate the category to be assigned from the Category Selector, check the associated box, and click update. At this point, your page is now associated with the category in question.

Related article: WordPress: How to add categories to a page (video)

How to Create a “Child Category” (Subcategory)

Categories are hierarchical, meaning that each one can have child categories. A child category is used for a sub-topic under a broader topic. For example, a news website may have a category News with child categories for Local, National, and Global news. 

To create a child category, go to the Posts→ Categories screen and select a parent category from the dropdown menu. Then fill in the name for your child category, adding the description and slug are optional. 

Now click the “Add New Category“ button and your child category will be created. 

Categories can be edited from Posts→ Categories screen. Move your mouse to the category you want to edit and then click on the “Edit” link. This will open the editor where you can add or remove parent and child categories, change the category name, slug, or description.

You can also delete categories from the Posts→ Categories screen.

NOTE: Deleting a parent or child category doesn’t delete your posts. WordPress automatically places posts that aren’t assigned to a category in the default category.

Related article: What is: Category

How to display pages within a category 

Another important element is the category page, serving as an index of all posts that belong to a particular subject. Understanding how to display a category page will facilitate your business development, increase conversions as well as enhance your overall SEO.

Display a page featuring posts from a single category

When a category is created, WordPress will automatically generate a page including posts from that category. In order to display that page, you just need to do some simple steps:

  1. Go to Posts → Categories

  2. Navigate to Categories, then click View under your desired category

When you click View, a category page will appear and you can get a direct link to this page. However, you will see the category base in your URLs, which causes difficulty in getting a higher Google ranking. There is a simple way to remove category on a slug in archive page link:

  1. Go to Settings → Permalinks

  2. Choose Custom Structure

  3. Add /%category%/%postname%/ after your domain

  4. Enter “.” to Category base

There are 2 steps to show the category page in menu and sidebar: 

  1. Assign posts to categories.First, you locate Posts and choose the post that you want to add to a category. On the right, you will see Category options. Just click on your desired category and Update your change.

  2. Display the category page in navigation menus and widget

Remember this: before displaying categories in the menu, you have to make sure that these categories have posts filed under them.

In menus, go to Appearance → Menus, select categories and click Add to Menus. In the sidebar, go to Appearance → Widgets, then choose the categories that you want to appear in the sidebar and click Add Widget.

When you want to show subcategories in the sidebar, drag and drop categories to a Sidebar. Then check the box next to Show hierarchy in Categories widget settings and click Save.

Related article: The Ultimate Guide to Display a Category Page in WordPress

How to customize a category

Formatting WordPress Category Pages

The layout of your category pages is determined by your theme. One way to change the layout of your category pages is to edit the Category page template. However, editing the Category page template from within the WordPress dashboard is not recommended for two reasons:

  1. Php coding is needed in order to do this

  2. Any changes made will be lost when the theme is updated

An easier option is to simply create a new page from your site’s dashboard and then use a post block plugin to create your own layout, limiting the posts displayed on the page by a specific category. 

Related article: Understanding WordPress Category Pages

Using the Enhanced Category Pages Plugin

Enhanced Category Pages works by letting you edit your category pages with all of the same WordPress Editor options you have when writing posts or pages.

While it’s possible to edit the theme files in use on your website to create your own custom category pages, the free Enhanced Category Pages plugin gives you an easier way to customize and add your own content to these pages, effectively turning them into landing pages for the individual topics you cover on your blog. Of course, coding will be needed (for those tech heads out there, give this one a try).

Once you’ve got the plugin activated, you can access the editor by going to Posts → Categories. Then, hover over your desired category and choose the Enhanced Edit option. Once you click on Enhanced Edit, you’ll see what looks like the normal WordPress Editor. Any content that you add here will go straight to your custom category pages.

To spruce up your category page, all you need to do is add some text and an image in the Enhanced Category Pages interface. 

Since Enhanced Category Pages is basically using a custom post type to insert content, you need to make sure to turn off commenting in the Enhanced Edits interface so that you don’t allow comments on your category pages. Just scroll down until you see the Discussion box and uncheck Allow comments.

The advantages of using this plugin are that those category archive pages are now much more informative to your readers.

By adding additional content, you can also increase the chances of those pages ranking in the search engines, just like the regular posts and pages on your blog. This, in turn, increases the visibility of your content, helping to bring more visitors to your website.

Enhanced Category Pages is free and listed at WordPress.org so you can install it directly from your WordPress dashboard.

Related article: How to Easily Create Custom Category Pages in WordPress

Share this post