Disable sidebar in single product page

This topic is empty.

Viewing 3 reply threads
  • Author
    Posts
    • #3080


      Cassy
      Guest

      Greetings. Is it possible to disable the sidebar on the single product page? I want to leave it active only in the products archive

    • #3081


      Spiracle Themes
      Guest

      Hi Cassey

      Thanks for reaching out
      You have to use a plugin called Simple Custom CSS and JS. Link below
      https://wordpress.org/plugins/custom-css-js/

      After installing and activating the plugin. Follow the steps mentioned in the screenshots below

      1) https://prnt.sc/fvxgCuCSuohO
      2) https://prnt.sc/lp-8cpHi76wT

      CODE BELOW:

      (function($) {
      $(document).ready(function() {
      if ($("body").hasClass("single-product")) {
      $("div.col-md-9").not(".right-column.col-md-9").removeClass("col-md-9").addClass("col-md-12");
      $("div#woo-sidebar-wrapper").hide();
      }
      });
      })(jQuery);

      Best Regards

    • #3084


      Cassy
      Guest

      Hi, can I hide via the theme’s function.php file? In this case what code should I enter?

    • #3085


      Spiracle Themes
      Guest

      Hi Cassey

      This is the easy method as compared to modifying the functions.php

      Best Regards

Viewing 3 reply threads

Reply To: Disable sidebar in single product page

Your information: