Firstly create a php file in root folder of wordpress directory
Include wp-load.php ->
<?php include "wp-load.php"; ?>
and you can check with this code (slug search)
$category_slug = "home";
if ($term = get_term_by('slug', $category_slug, 'category'))
{
$term_ID = $term->term_id;
$cat_id = $term_ID;
}
else $cat_id=-1;
OR by name
if ( is_term( 'uncategorized' , 'category' /* do not change this */ ) ) // category_slug, search_place
return true;
else
return false;
OR by id
$cat = get_category(1); // cat_ID
if ( !empty( $cat ) )
return true;