get current category ID php
<p>I'm trying to get category ID of the current archive displayed.</p>

<p>I tried:</p>

<pre><code>// category (can be a parent category)
$current_cat_ID = get_query_var('cat');
//
print_r ($current_cat_ID);
</code></pre>

<p>It doesn't print anything...</p>
