Created
September 25, 2015 00:30
-
-
Save mgibbs189/dca8464632571fd03c26 to your computer and use it in GitHub Desktop.
FacetWP - index EDD FES (Front End Submissions) multi-select values
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 | |
function index_EDD_FES_multiselect( $params, $class ) { | |
if ( 'product_style' == $params['facet_name'] ) { | |
$choices = explode( '| ', $params['facet_display_value'] ); | |
foreach ( $choices as $choice ) { | |
$params['facet_value'] = $choice; | |
$params['facet_display_value'] = $choice; | |
$class->insert( $params ); | |
} | |
return false; | |
} | |
return $params; | |
} | |
add_filter( 'facetwp_index_row', 'index_EDD_FES_multiselect', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment