We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05ac55f commit 0f0a937Copy full SHA for 0f0a937
src/Integrations/FacetWp.php
@@ -0,0 +1,20 @@
1
+<?php
2
+
3
+namespace BernskioldMedia\WP\Experience\Integrations;
4
5
+class FacetWp extends Integration {
6
+ public static string $plugin_file = 'facetwp/index.php';
7
8
+ public static function hooks(): void {
9
+ /**
10
+ * set is_main_query to false to stop facetwp to alter tribe_events queries causing events to
11
+ * display in the wrong order if used in our BM Block Library
12
+ */
13
+ add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
14
+ if ( 'tribe_events' == $query->get( 'post_type' ) ) {
15
+ $is_main_query = false;
16
+ }
17
+ return $is_main_query;
18
+ }, 10, 2 );
19
20
+}
0 commit comments