Last active
February 25, 2020 11:52
-
-
Save mgibbs189/5cf539766c0cc37e0c75f2bb76b3b1f9 to your computer and use it in GitHub Desktop.
FacetWP - prevent proximity from re-ordering "post__in"
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 to your (child) theme's functions.php | |
// this unregisters the proximity facet's "post ID re-sorting" hook | |
add_filter( 'facetwp_query_args', function( $query_args ) { | |
remove_filter( 'facetwp_filtered_post_ids', [ FWP()->helper->facet_types['proximity'], 'sort_by_distance' ] ); | |
return $query_args; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment