Search results empty
-
Hey,
I got a problem with latest Version of Plugin and WordPress, so that I always got “No results found.”.
I figured out, that after functionload_template__search_results__wp_query
callsload_template
the global variable $wp_query has no results. Just the number of found_posts which is set in line 149 is present.
So in the template that is loaded have_posts returns false.
I guess it’s becausequery_posts
overrides $wp_query. My quickfix was to change line 151, and pass the $data[‘query’] to the template:load_template( $data['template'], true, $data['query'] );
In the template I called:<?php if ( $args->have_posts() ) : ?>
<?php while ( $args->have_posts() ) : $args->the_post(); ?>Best regards
elancer-team
- You must be logged in to reply to this topic.