is_category


is_category ( $category = '' )

Parameters:
  • (mixed) $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
Returns:
  • (bool)
Defined at:

Description

Determines whether the query is for an existing category archive page.

If the $category parameter is specified, this function will additionally check if the query is for one of the categories specified.

For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.

Related Functions

in_category, has_category, the_category, get_category, wp_insert_category

Top Google Results

User discussions

wpseek mobile