WordPress.org

Ready to get started?Download WordPress

Forums

Getting Category ID on Archive Page (3 posts)

  1. lelandmcfarland
    Member
    Posted 3 years ago #

    I am looking for a way to get the category ID while in archive.php, if the page that is accessed is a category. Anyone have any ideas on how to do this?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    get_query_var('cat');

  3. lelandmcfarland
    Member
    Posted 3 years ago #

    Worked like a charm. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic