Forums

category function to return category name? (5 posts)

  1. Anonymous
    Unregistered
    Posted 7 years ago #

    I'm working on a template, and I'm in the post loop, trying to get the category *name* of the post. the_category() function returns the category in a list format, I just want something that echo's back the name of the category...
    Can someone direct me to the appropriate function, I can't seem to find one in the template-functions-category.php include.
    Thanks

  2. Anonymous
    Unregistered
    Posted 7 years ago #

    edit: make that "something that *returns* back the name of the category, not echo's it"

  3. Anonymous
    Unregistered
    Posted 7 years ago #

    nm, found i had to edit the css in order to stop it from being returned as a list... seems odd that a php function would return a string indicating a css class name... what happened to seperation of data and design?

  4. DennisWilliamson
    Member
    Posted 7 years ago #

    slanted - see the first paragraph of my post here.

  5. KerimFriedman
    Member
    Posted 6 years ago #

    I just discovered this problem too. What a pain.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.