Get ID of Current Category – WordPress
Getting the ID of the current category in WordPress is actually quite simple. This will work in category archive pages or anywhere a category has been queried. We are going to use get_queried_object() to accomplish this task. The following script will get all the information about our queried object and put it in an array, $category. Then we are simply … Read More