Created
May 25, 2017 20:13
-
-
Save mgibbs189/f8c92b935bf5939be8129935816e3ff5 to your computer and use it in GitHub Desktop.
FacetWP - ElasticPress Bugfix
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 | |
// props @zaphod-42 <https://wordpress.org/support/topic/not-working-with-facetwp/#post-9168365> | |
add_filter( 'facetwp_pre_filtered_post_ids', function( $post_ids ) { | |
if ( ! empty( $post_ids ) && is_object( $post_ids[0] ) ) { | |
$post_ids = wp_list_pluck( $post_ids, 'ID' ); | |
} | |
return $post_ids; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment