Support » Fixing WordPress » commas between categories

  • I know this is probably a simple question, but not being a php pro, I can’t solve it. How can I include a comma and space after each category if category > 1? Example: my posts now read “General Science XML” instead of “General, Science, XML”

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Look in index.php for the_category() and change it to the_category(‘, ‘) — that’s a comma and a space in quotes.

    This article at A List Apart is a good beginning:
    In particular, read the called “Truly inline lists.”

    But you’ll have to get into the actual function and change some of the code so that at least the first (or last) LI tag has a class attribute.

    I’m wanting to do this, too, and in the next couple of weeks, I should have it down. I’ll post it here whenever I do get it.

    Uh, scruffy? Check rossz’ suggestion above.

    Also, for “conversational” category listings (General, Science and XML), see this plugin:

    uh oh…changed it, ftp’d index.php, and now this is what I see:
    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/domains/ on line 80

    any ideas? Line 80 is the search function, by the way, which I didn’t touch.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘commas between categories’ is closed to new replies.