Support » Plugin: WooCommerce Product Slider » hide slider if there are no images to display

  • Hello,

    This is a great plugin. Can you tell me how to hide the entire slider if there are no products to display? We are using the slider on a product page and if there are no related products to display the slider is empty and isn’t very user friendly to be on the page without products. Your assistance is very appreciated.

    Thank you!!

    https://wordpress.org/plugins/woocommerce-product-slider/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author subhansanjaya

    (@subhansanjaya)

    Please, find classes/class-wps.php file inside the plugin folder. Then add the following code after line #133. This will hide the slider completely, if there are no products.

    if(!isset($get_products)){ return false;}

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    That may work but is there another option such as via a filter or action?

    When you update your plugin then this user will lose all of their modifications.

    Plugin Author subhansanjaya

    (@subhansanjaya)

    @jan Dembowski Sorry for the late response. I’ve asked him to do that because I’m going to add that line of code on the next version. So, when I update my plugin user will not lose their modifications. Anyway, Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘hide slider if there are no images to display’ is closed to new replies.