Skip to main content
linked to Codex
Source Link
Rarst
  • 99.9k
  • 10
  • 160
  • 298

You can use is_object_in_term() ( not documented in Codex, see source )is_object_in_term(). Despite name it can also check for taxonomy match if terms are omitted.

is_object_in_term( get_the_ID(), 'category' );

You can use is_object_in_term() ( not documented in Codex, see source ). Despite name it can also check for taxonomy match if terms are omitted.

is_object_in_term( get_the_ID(), 'category' );

You can use is_object_in_term(). Despite name it can also check for taxonomy match if terms are omitted.

is_object_in_term( get_the_ID(), 'category' );
Source Link
Rarst
  • 99.9k
  • 10
  • 160
  • 298

You can use is_object_in_term() ( not documented in Codex, see source ). Despite name it can also check for taxonomy match if terms are omitted.

is_object_in_term( get_the_ID(), 'category' );