commas between categories (5 posts)

  1. tbubble
    Posted 11 years ago #

    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!

  2. rossz
    Posted 11 years ago #

    Look in index.php for the_category() and change it to the_category(', ') -- that's a comma and a space in quotes.

  3. scruffy
    Posted 11 years ago #

    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.

  4. Kafkaesqui

    Posted 11 years ago #

    Uh, scruffy? Check rossz' suggestion above.

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


  5. tbubble
    Posted 11 years ago #

    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/x.teebubble.com/docs/wordpress/index.php on line 80

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

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.