Created
November 15, 2024 16:24
Fix issues between FacetWP with a custom (e.g. not main query) WP_Query and Theme My Login
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_filter('facetwp_is_main_query', filter_facetwp_is_main_query, 10, 2 ); | |
function filter_facetwp_is_main_query( $is_main_query, $query ) { | |
if ( 'template' == $query->get('post_type') ) $is_main_query = FALSE; | |
return $is_main_query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment