Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created July 28, 2017 06:00
Show Gist options
  • Save SiR-DanieL/eb30d9646eddbbd5b3f8aebce7febdff to your computer and use it in GitHub Desktop.
Save SiR-DanieL/eb30d9646eddbbd5b3f8aebce7febdff to your computer and use it in GitHub Desktop.
functions.php
add_action( 'woocommerce_no_products_found', 'show_products_on_no_products_found', 20 );
function show_products_on_no_products_found() {
echo '<h2>' . __( 'You may be interested in...', 'domain' ) . '</h2>';
echo do_shortcode( '[recent_products per_page="4"]' );
}
Copy link

ghost commented Aug 1, 2017

It will be great if we could display those interesting products in a carousel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment