Created
August 27, 2016 15:35
-
-
Save dboutote/0fa2b55264577dd3fcc53b615dc40cce to your computer and use it in GitHub Desktop.
Filtering Allowed Taxonomies in the Advanced Categories Widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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