Find this line in the search.php:
$query = new WP_Query($args) ;
Comment it out (add // in the beginning of the line). Now the search should work.
Thread Starter
Tribun
(@3task)
Thank you for your quick reply!
Unfortunately it dont work.
This is my line:
);
// $query = new WP_Query($args) ;
?>
Then I get this error:
Fatal error: Call to a member function have_posts() on a non-object in /www/htdocs/******/dev/test/wp-content/themes/******/search.php on line 179
Line 179 is:
<?php if ( $query->have_posts() ) : ?>
Thank you!
-
This reply was modified 9 years, 2 months ago by
Tribun.
Ah, missed that. Instead of $query->have_posts(), you need to have just have_posts(). Also, instead of $query->the_post();, you need to have the_post(); and instead of $query->max_num_pages, use $wp_query->max_num_pages.
Thread Starter
Tribun
(@3task)
Thank you it works now. Great Plugin!