diff --git a/class-es-wp-query-shoehorn.php b/class-es-wp-query-shoehorn.php index 3d7c938..cfd80b5 100644 --- a/class-es-wp-query-shoehorn.php +++ b/class-es-wp-query-shoehorn.php @@ -21,6 +21,11 @@ function es_wp_query_arg( $vars ) { * @return void */ function es_wp_query_shoehorn( &$query ) { + // Prevent infinite loops! + if ( $query instanceof ES_WP_Query ) { + return; + } + if ( true == $query->get( 'es' ) ) { $conditionals = array( 'is_single' => false, @@ -219,4 +224,4 @@ private function reboot_query_vars( &$query ) { $q['posts_per_page'] = get_option( 'posts_per_page' ); } } -} \ No newline at end of file +}