1. CSS
  2. Flash
  3. HTML
  4. Illustrator
  5. Java
  6. JavaScript
  7. Maya
  8. Photography
  9. Photoshop
  10. PHP
  11. Ruby
  12. Ruby on Rails
  13. 3ds Max

PHP: How to Exclude Category from Post’s Category List

  1. Clicks today:
  2. Clicks this month:
  3. Overall rating:

PHP » Content Management Systems — almost 9 years ago
WordPress provides a function that displays the category to which a post belongs: the_category(). If the post is in multiple categories, the function will list them all, linked to the respective archive page. For some reason, maybe you want to exclude one or two categories for the list. This can be achieved by hacking the_category function, or create a new code to list the category, to replace the_category.


Your Comment

You must be logged in to post a comment.