"Your support is fantastic"
— Bren Nixon What They Say

How to Add a Category with a Comma in WordPress

Most questions we get relate specifically to our themes and plugins but some are broadly related to WordPress. We think it would be a good idea to answer some of those general WordPress questions on our blog from time to time as a resource for the WordPress community.

A question like this came in today.

I don’t seem to be able to create a category with a comma in the title. “Faith, Hope and Love” becomes “Faith” as one category and “Hope and Love” as another.

The original question was related to adding a Sermon Series but we’ve reworded the question to make it applicable to WordPress blog categories. The problem and solution are the same no matter what taxonomy is used.

The Problem

Let’s try adding Faith, Hope and Love as a category when adding (or editing) a new post.

Category Commas Add Screen

You can see that a category with a comma like Faith, Hope and Love gets added as two categories (Faith and Hope and Love). This happens because WordPress lets you add multiple taxonomy terms (categories and tags, for example) in one shot while adding or editing a post. It treats commas as a separator for multiple entries. This is more useful for tags than categories.

The Solution

Add your category with a comma via Posts > Categories.

Category Commas Categories-Screen

Then, return to add or edit your post and select the category. You will see that it’s title remains intact, with comma and all.

Category Commas Add Screen-correct

Adding a category with a comma is not a question that is asked very often but it may be that you have had this problem and found this article via Google. We hope it helped you add your category with a comma.