borkolivic

Tražilica i izdvojeni proizvodi na stranici s 0 rezulata pretrage

Dec 8th, 2021
867
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_action( 'woocommerce_no_products_found', 'mx_featured_products_on_no_products_found_page', 20 );
  2. function mx_featured_products_on_no_products_found_page() {
  3.  
  4.     echo '<h2>' . __( 'Ponoviti pretragu koristeću druge pojmove?', 'woocommerce' ) . '</h2>';
  5.     get_product_search_form();  //zakomentirati ako je npr. product search u sidebaru
  6.    
  7.     echo '<h2 style="margin-top:20px;">' . __( 'Možda će vas zanimati:', 'woocommerce' ) . '</h2>';
  8.     echo do_shortcode( '[featured_products per_page="4"]' );
  9. }
RAW Paste Data