• Is there a way to change the behavior of the_category where, if a post is only in one category, it is displayed as:
    Filed under the category: WordPress.
    Under two categories as:
    Filed under the categories: WordPress and Software.
    Under three or more categories as:
    Filed under the categories: WordPress, Internet and Software.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hmm, I think that might be complicated.
    The code now <?php _e("Filed under:"); ?> <?php the_category() ?>
    the_category part only pulls the actual list of the categories and the Filed under comes from the other part. You can make it say anything you want, by changing it, but I don’t know how you could make it behave differently depending on how many categories are actually used. But who knows, maybe it could be done.

    Yeah, the_category() doesn’t allow for that display. I wrote a plugin for you that can handle different separators between penultimate and last categories.
    WordPress Nice Categories Plugin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing the way the_category behaves?’ is closed to new replies.