Test if post has a 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()) ...

Leave a Comment

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