Use has_category
instead.
if (has_category('',$post->ID)) ...
If you want to use it in The Loop, you don’t need to specify the ID.
if (has_category()) ...
Use has_category
instead.
if (has_category('',$post->ID)) ...
If you want to use it in The Loop, you don’t need to specify the ID.
if (has_category()) ...