Created
January 13, 2020 14:23
-
-
Save mgibbs189/29de4296fb6891a8389df42df45e8628 to your computer and use it in GitHub Desktop.
FacetWP - use a dummy facet to populate 2 data sources
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 the following to your (child) theme's functions.php | |
add_filter( 'facetwp_index_row', function( $params, $class ) { | |
if ( 'region_partner' == $params['facet_name'] ) { | |
$params['facet_name'] = 'region_dropdown'; // trick FacetWP into saving values into the other facet | |
} | |
return $params; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment