/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if (is_category()) { global $wp_query; $cat_obj = $wp_query->get_queried_object(); echo $cat_obj->name . " has id ". $cat_obj->term_id; } ?>
Comments
