WordPress.org

Forums

How can I hide some of the categories from the_category list? (2 posts)

  1. fsnelting
    Member
    Posted 9 years ago #

    Hello,

    I am listing categories below each post using the_category, but because some of the categories are meaningless (such as "frontpage"), I'd like to exclude them from the list.

    See it in action here:
    http://www.geuzen.org/test/?cat=61

    It is easy to do when using wp_list_cats, but I can't find out how to do the same with the_category? I'm somehow not thinking in the right direction...

    Thanks a lot for your help!

    Femke

  2. Michael Bishop

    Posted 9 years ago #

    perhaps someone with more PHP experience can expound, but I believe the template tag get_the_category would be the ticket.

    http://codex.wordpress.org/Template_Tags/get_the_category

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags