I find myself needing to know the category ID of the currently category, outside of the loop.
Meaning, I want to be able to simple return the cat ID, just like you can get the cat title using “single_cat_title()”.
Before I write such a device, is there one already?
get_the_category() doesn’t work correctly in this instance.
- The topic ‘How to get current category ID outside of the LOOP.’ is closed to new replies.