Skip to content

Snippet: Enable “Category Colors” for Custom Taxonomies

By default the Category colors functionality is only enabled for the standard category taxonomy but it can be enabled for custom taxonomies with a little code.

/**
 * Enable "Category Colors" for Custom Taxonomies.
 *
 * @link https://total.wpexplorer.com/docs/snippets/category-colors-custom-taxonomies/ 
 */
add_filter( 'wpex_term_colors_supported_taxonomies', function( $taxonomies ) {
	$taxonomies[] = 'your_custom_taxonomy';
	return $taxonomies;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top