wordpress if is in categroy

You can use the following code in your WordPress theme to check if the current post is in a specific category:

<?php 
if ( in_category( 'your_category_slug' ) ) {
    // Your code here
} 
?>

Replace 'your_category_slug' with the slug of the category you want to check. This code will allow you to execute specific actions or display content only if the current post is in the specified category.