php - Add function to head "no product found"

admin2025-01-07  4

I build my proper shop with ecommerce, and I'm beginner in development, I know correctly the CSS/HTML but JS he's not my tea cup... Actually, I want to display some products randomly in my "no_product_found" page in woocommerce. When a customer come to a product that are out of the shop, or a empty subcategory, he display products randomly.

I have add this hook to my function.php file from my child template

add_action( 'woocommerce_no_products_found', 'show_products_no_products', 20 );
function show_products_no_products() {
    echo '<h2 class="customnoproduct">' . __( 'Houston... On a un problème! </br>On a rien trouvé comme produits dans cette catégorie 
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736264705a988.html

最新回复(0)