Seperating Multiple Categories On the Meta Line (3 posts)

  1. dansgirl165
    Posted 12 years ago #

    I have a question that I couldn't find an answer to when I did a search.
    For instance, if I make a blog post and put that post under more than one category, when I see the post and the line "Filed Under: xxxx" (or the meta in the index template), there is no separation between the two categories with a comma or anything else. Say, if I made a post and I put it under the categories "Misc." and "Blog Stuff", the line looks like this:
    Filed Under: Misc Blog Stuff--Kathy@10:00
    My question is there a way to put a comma in between the categories when there are multiple categories? If so, what file would I have to go into to change this so the multiple categories are seperated by a comma? And what code would I have to add or what changes to the existing code would I have to make?
    I tried putting it in the line of code in the index template, but that just put the comma after the last category.
    The link to my blog is right here.
    Just a bit off topic, I've recently migrated to WordPress from MT a few weeks ago. I'm very, very happy that I made the switch. Thank you for creating such a great program. :)

  2. Ryan Boren
    WordPress Dev
    Posted 12 years ago #

    In index.php, change this:
    <?php the_category() ?>
    to this:
    <?php the_category(',') ?>
    The first argument to the_category() is the separator you want to use.

  3. dansgirl165
    Posted 12 years ago #

    Thanks! :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.