Table of Contents
The Filter element lists the Portfolio categories and tags. To let it list a custom taxonomy as well, use one of the two methods below.
A. Method with PHP code
The vpf_allow_taxonomy_for_filter filter decides whether a taxonomy may be used in the Filter. Return true for the one you want:
<?php
add_filter( 'vpf_allow_taxonomy_for_filter', 'my_filter_vpf_allow_taxonomy_for_filter', 10, 2 );
function my_filter_vpf_allow_taxonomy_for_filter( $allow, $taxonomy ) {
if ( 'my_custom_taxonomy' === $taxonomy ) {
$allow = true;
}
return $allow;
}
B. Method with settings
You can also add the custom taxonomy slug in the plugin settings, without writing any code:
