Skip to content

Instantly share code, notes, and snippets.

@dboutote
Created August 27, 2016 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dboutote/0fa2b55264577dd3fcc53b615dc40cce to your computer and use it in GitHub Desktop.
Save dboutote/0fa2b55264577dd3fcc53b615dc40cce to your computer and use it in GitHub Desktop.
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