Disable sidebar in single product page

C Started by Cassy · April 28, 2023 at 7:56 pm · 3 replies 0 voices Last reply 3 years, 2 months ago
ST
Spiracle Themes Original poster
#2

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

Post a reply

Join the conversation. Be kind — this is a public forum.

Replying to Disable sidebar in single product page

By posting, your reply becomes public (unless marked private).