WordPres get_posttype
if ( get_post_type( get_the_ID() ) == 'slug_post_type' ) {
//if is true
}
Gifted Gannet
if ( get_post_type( get_the_ID() ) == 'slug_post_type' ) {
//if is true
}
// Retrieves the post type of the current post or of a given post.
get_post_type( int|WP_Post|null $post = null )