Created
November 22, 2019 17:48
-
-
Save djrmom/7a18a9977fbcbd4045af56be2506492d to your computer and use it in GitHub Desktop.
facetwp has term
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 | |
add_filter( 'facetwp_index_row', function( $params, $class ) { | |
if ( 'my_facet_name' == $params['facet_name'] ) { // change my_facet_name to the name of your facet | |
$params['facet_value'] = "1"; | |
$params['facet_display_value'] = 'Has Term'; // change Has Term to whatever you want for a label | |
} | |
return $params; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment