guideplugin/guide/taxonomies
Definition
With this filter you can adjust the included or excluded term ID’s.
Parameters
appy_filters('guideplugin/guide/taxonomies', $taxonomy_settings, $guide_id);
$taxonomy_settings
(array) This array contains the information to include or exclude taxonomies.$guide_id
(int) The ID of the guide.
The $taxonomy_settings array looks like this:
$taxonomy_settings = array( 'option' => 'include', // Include or exclude taxonomies? 'selection' => [12, 124], // The term_taxonomy_id );
Example
The example shows you how to adjust the included or excluded term ID’s.
<?php function my_guide_taxonomies($taxonomy_settings, $guide_id) { if ($guide_id == 24) { // The guide you want to modify array_push($taxonomy_settings['selection'], 14); // Add term ID 14 to the taxonomy selection } return $taxonomy_settings; } add_filter('guideplugin/guide/taxonomies', 'my_guide_taxonomies', 10, 2);