in_category for custom post types

Using in_category here is the correct function to use (it doesn’t distinguish between post types).

The second argument accepted by in_category is the post ID or object – but in this case, can be omitted as we are using it inside the Loop.

The first argument is the Category ID (as an integer) or slug / name (as a string). Or alternatively an array of these. So make sure that ‘Lesson Pack’ is the name of the category (or else try using the slug, or the category ID).


Edit

As per comments, the plugin uses a custom taxonomy rather than the default category taxonomy. In that case, the function you should use is: has_term

 has_term('Lesson Pack', 'my-custom-taxonomy')

where the second argument is the name of the custom taxonomy.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)