Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Filtering Allowed Taxonomies in the Advanced Categories Widget
<?php
/**
* This will ADD a custom taxonomy to the allowed taxonomies used by the widget
* */
function filter_acatw_allowed_taxonomies( $taxonomies ){
$taxonomies['project_category']= 'Project Categories';
return $taxonomies;
}
add_filter( 'acatw_allowed_taxonomies', 'filter_acatw_allowed_taxonomies' );
?>
<?php
/**
* This will REPLACE the allowed taxonomies with a custom taxonomy
* */
function filter_acatw_allowed_taxonomies( $taxonomies ){
$taxonomies = array();
$taxonomies['project_category']= 'Project Categories';
return $taxonomies;
}
add_filter( 'acatw_allowed_taxonomies', 'filter_acatw_allowed_taxonomies' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment