is_category
is_category ( $category = '' )
Parameters:- (int|string|int[]|string[]) category Optional. Category ID, name, slug, or array of such to check against. Default empty.
Returns:- (bool) Whether the query is for an existing category archive page.
Defined at: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
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 Conditional Tags} article in the Theme Developer Handbook.