is_category( int|string|int[]|string[] $category = '' ): bool  Determines whether the query is for an existing category archive page.   Description 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  Conditional Tags article in the Theme Developer Handbook.   Parameters   $category int|string|int[]|string[] Optional     Category ID, name, slug, or array of such to check against.   Default: ''     Return bool Whether the query is for an existing category archive page.   More Information  See also is_archive()  and Category Templates. For Custom Taxonomies use is_tax()     Source  File: wp-includes/query.php. View all references  function is_category( $category = '' ) {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
		return false;
	}

	return $wp_query->is_category( $category );
}
   Related  Uses    Uses Description      WP_Query8b7c:f320:99b9:690f:4595:cd17:293a:c069is_category() wp-includes/class-wp-query.php   Is the query for an existing category archive page?     __() wp-includes/l10n.php   Retrieves the translation of $text.     _doing_it_wrong() wp-includes/functions.php   Marks something as being incorrectly called.   
   Used By    Used By Description      rest_get_queried_resource_route() wp-includes/rest-api.php   Gets the REST route for the currently queried object.     wp_get_document_title() wp-includes/general-template.php   Returns document title for the current page.     get_the_archive_title() wp-includes/general-template.php   Retrieves the archive title based on the queried object.     term_description() wp-includes/category-template.php   Retrieves term description.     wp_dropdown_categories() wp-includes/category-template.php   Displays or retrieves the HTML dropdown list of categories.     wp_list_categories() wp-includes/category-template.php   Displays or retrieves the HTML list of categories.     feed_links_extra() wp-includes/general-template.php   Displays the links to the extra feeds such as category feeds.     wp_title() wp-includes/general-template.php   Displays or retrieves page title for all areas of blog.     single_term_title() wp-includes/general-template.php   Displays or retrieves page title for taxonomy term archive.     WP8b7c:f320:99b9:690f:4595:cd17:293a:c069handle_404() wp-includes/class-wp.php   Set the Headers for 404, if nothing is found for requested URL.     get_body_class() wp-includes/post-template.php   Retrieves an array of the class names for the body element.     redirect_canonical() wp-includes/canonical.php   Redirects incoming links to the proper URL based on the site url.   
    Changelog    Version Description     1.5.0 Introduced.    

    
{'path': 'public/docs/wordpress/functions/is_category.html', 'source': 'DevDocs.IO'}