Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Created September 25, 2015 00:30
Show Gist options
  • Save mgibbs189/dca8464632571fd03c26 to your computer and use it in GitHub Desktop.
Save mgibbs189/dca8464632571fd03c26 to your computer and use it in GitHub Desktop.
FacetWP - index EDD FES (Front End Submissions) multi-select values
<?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