WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Using Commas In Category Names (4 posts)

  1. abramarket
    Member
    Posted 1 year ago #

    Hi!

    I have a client who would like a category created with a comma in it. So the category will be:

    Fuel, Oil And Propane

    However, using a comma in the title breaks the relation to the slug and makes it so WordPress does not find the category posts and shows the category as empty. When I remove the comma from the text title - i.e. make the category "Fuel Oil And Propane", the posts all appear correctly, so it is clearly the comma breaking the slug from finding the posts that it needs to pull.

    This seems like it would be a common problem as many people would want to create categories with commas. Does anyone have a solution for this? Either with the slug, or with some other code I can add?

    Thanks for any help!

  2. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    Sure you can use commas, http://codex.wordpress.org/Separating_Categories

    Yes, no commas in a slug but the relationship should be there. What theme are you using?

    [edit] Are all three categories?

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    in my experience, this should be possible if you add the category in
    dashboard - posts - categories - add new category;

    there you can set the category name, slug, and description.

    example for the slug: fuel-oil-and-propane

    using a comma in the title breaks the relation to the slug and makes it so WordPress does not find the category posts and shows the category as empty

    where inyour site?

  4. abramarket
    Member
    Posted 1 year ago #

    Hi Everyone,

    Thank you for your help!

    I actually discovered it was a theme issue. The site is using the "Business Directory Plugin" which needed an upgrade. The upgrade seems to have solved the category issues.

    Thank you again!

Topic Closed

This topic has been closed to new replies.

About this Topic