Custom taxonomy for filter

A. Method with PHP code

There is an available filer vpf_allow_taxonomy_for_filter that allows you to use custom taxonomy as a filter. Example:

<?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 add a custom taxonomy slug in the plugin settings. Example:

Was this page helpful?