WordPress.org

Support

Support » Plugins and Hacks » Hacks » How to get the category ID

How to get the category ID

  • I’m trying to get the category ID # to use in a switch statement.
    I’ve searched and have found a few things but can’t get them to work.
    Basicly what I’m testing is this

    $category_id = get_cat_ID();
    echo “$category_id”;

    Also do the permalinks effect this?

    Any pointers would be appreciated, Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get the category ID’ is closed to new replies.
Skip to toolbar