Your account expired support, please renew to get your support.

Home Forums Themes Support Claue Hide WooCommerce Sub-Category Widget from Menu when viewing Vendor Shop

Viewing 7 reply threads
  • Author
    Posts
    • #29403
      bankzy
      Support Expired

      Hello,

      I am trying to hide the sub-menu created when adding the WooCommerce category widget to the “WooCommerce Categories Menu Sidebar” when viewing any vendor shop from WC Vendors Pro.

      I have tried using javascript to hide the class below when viewing a certain permalink but I cannot get anything to work. The vendor name (club name in our case) would be prefixed to the end of that URL but I was hoping to include if anyone visits the below URL containing /club/ it would hide the below css class.
      <p style=”padding-left: 30px;”>http://www.bdtesting.co.uk/club/</p>
      <p style=”padding-left: 30px;”>.shop-top-sidebar</p>
       

    • #29406
      Harry
      Support Expired

      Hi Bankzy,

      I check your link http://www.bdtesting.co.uk/club/boltonmetro/ the sub-category menu hided. Did you solve problem?

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #29407
      bankzy
      Support Expired

      Sorry I have just added the following JS but it’s also hiding it on every other WooCommerce category page which isn’t what I want. It seems to be ignoring my URL all together…

       

      window.onload = function() {
      if (window.location.href.indexOf(‘www.bdtesting.co.uk/club’)) {
      //Hide the element.
      document.querySelectorAll(‘.shop-top-sidebar’)[0].style.display = ‘none’;
      }
      };

    • #29411
      Harry
      Support Expired

      Hi,

      Please try go to Widgets > WooCommerce Categories Menu Sidebar and check in only http://prntscr.com/msyhnd

      “Only show children of the current category”

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #29412
      bankzy
      Support Expired

      Hello,

      Yes I have tried that and thought it would work as I had hoped, however, when you click into a child category I still want the category bar to show so that customers can switch to another category very easily.

    • #29413
      Harry
      Support Expired

      Please add below code to Claue > Theme Option > General Layout > Custom CSS

      .post-type-archive.post-type-archive-product .shop-top-sidebar {display: none;}

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #29414
      bankzy
      Support Expired

      Ahh fantastic! Had no idea vendor products were tagged as archive.

      Thank you for the swift responses!

    • #29421
      Harry
      Support Expired

      You’re welcome. Have great week ahead!

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 7 reply threads

You must be logged in to reply to this topic.