I want to display in default shop page from WooCommerce only featured products, nothing more... It's there a solution to display in WooCommerce shop template only the featured products?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
First you have to override archive-product.php template to your theme file
then add below code to display featured product in shop pahe.
Use the following code in your functions.php to display featured products in the shop page.
You should use this custom function hooked in
woocommerce_product_query_tax_query
filter hook, that will display only featured product in shop (but not in other archives pages):Code goes in function.php file of your active child theme (or active theme). Tested and works.