Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Listify Snippet: Remove Location Facets
<?php
// Filter registered facets.
add_filter( 'facetwp_facets', function( $facets ) {
/**
* Loop each facets.
* Listify facets are "keyword", "location", and "category"
*/
foreach ( $facets as $index => $facet ) {
// If facet name is "location", unset it.
if ( 'location' === $facet['name'] ) {
unset( $facets[ $index ] );
}
}
return $facets;
}, 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment