SyntaxFix
Write A Post
Hire A Developer
Questions
The oldest but fastest way you can use is:
$cat_id = get_query_var('cat');