Support » Fixing WordPress » How to get current category ID outside of the LOOP.

  • Resolved palamedes

    (@palamedes)


    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.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to get current category ID outside of the LOOP.’ is closed to new replies.