When displaying a category how can I tell what category it is? Say I'm on http://www.example.com/category/quotes, how can I get quotes aside from parsing the URL? I tried get_the_category() but it returns an array of all the categories of the first post shown in the page.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
This should get you category object with ID, slug and rest of info:
|
|||
|
|
|
You can get the category name with:
Reference: http://codex.wordpress.org/Function_Reference/single_cat_title |
|||||
|