Created
September 16, 2020 14:48
-
-
Save mgibbs189/61eeb5fbdfe514e19c9c95e8e03bba3a to your computer and use it in GitHub Desktop.
Ignore certain post type archives
This file contains hidden or 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 | |
| add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) { | |
| if ( $query->is_post_type_archive( [ 'opleidingen', 'cursussen', 'groepsleertherapie' ] ) ) { | |
| $is_main_query = false; | |
| } | |
| return $is_main_query; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment