In storefront
theme, for no result in search page
, I would like to show featured products
in that view.
So in /storefront/woocommerce/loop/no-product-found.php
, i've added this code:
<div class="site-main">
<?php echo do_shortcode('[products per_page="10" columns="3"]')?>
</div>
So when i search for something like "shoes",I was hoping wordpress to show no results and then goes on showing the featured products. However, I'm not able to show the featured products.
When I check the query, its partly due to the page is in search where there is a query searching for the product name which is "shoes".
Is there a way to exclude that in any queries for search page? If that makes any sense.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…