WordPress.org

Ready to get started?Download WordPress

Forums

Getting the category_ID in archive.php (1 post)

  1. lynx
    Member
    Posted 8 years ago #

    Hi!

    I want to put a list of my subcategories under the category_description. I know, I have to use this line

    wp_list_cats('&child_of='.$cat_id.'&children=1');

    But I dont know how to get the actual cat_ID.
    I use WP202 and if I am in a category with subcats, I try to get the ID with get_the_category... but this returns a ID of a subcategory, which is placed IN the category I am.
    So, how can I get the ID of the actual cat?

    Any solutions for this problem?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags