WordPress WooCommerce search not displaying search results?

I have a WordPress website with WooCommerce plugin installed.

There is one problem that i cannot figure out why do I do not got any search results shown up when I do product search?

Read More

Website URL with search query:

http://www.v-tac.hr/?s=round&post_type=product

Website URL (I use search on my left blue sidebar – topbar search is not yet configured):

http://www.v-tac.hr/

I have edited default search.php of WordPress theme, code here:

<?php get_header(); ?>
<?php
$search = get_query_var("s");
$mySearch =& new WP_Query("s=$s&showposts=-1");
$num = $mySearch->post_count;
?>
Search results for <?php the_search_query(); ?> - <?php echo $num; ?> results
<?php
$argss = array ( 
'orderby' => 'date',
's' => $search,
'order' => 'DESC', 
'showposts' => 25, // 12
'no_found_rows' => true,
'post_type'=>'product',
'post_status' => 'publish',
'cache_results' => false,
'update_post_term_cache' => false,
'update_post_meta_cache' => false
);
$querya = new wp_query($argss); 
if ($querya->have_posts()) :
$row_count=0; 
while ($querya->have_posts()) :
$row_count++;
$querya->the_post();
global $product;
the_title(); ?>
<?php endwhile; endif; ?>
<?php get_footer(); ?>

I have also tried adding new page with page-template (same code), URL:

http://www.v-tac.hr/rezultati-pretrazivanja/

My wp-config.php file has got debug on – debug.log file is empty, no PHP errors are shown up.:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('SAVEQUERIES', true);
define('WP_DEBUG_DISPLAY', true);

Any suggestions? Ideas?

Thanks!

Related posts