• Hi,

    I want to completely hide the main menu on 1 product page in my woocommerce store, can the premium plugin do this?

    Thanks.

Viewing 1 replies (of 1 total)
  • Install a plugin like “My Custom Functions” and add the following function:

    add_filter('if_menu_conditions', 'my_new_menu_conditions');
    
    function my_new_menu_conditions($conditions) {
      $conditions[] = array(
        'id'        =>  'ID_OF_THE_NEW_RULE',                       // unique ID for the rule
        'name'      =>  __('NAME OF THE NEW RULE'),    // name of the rule
        'condition' =>  function($item) {                                   // callback - must return Boolean
          return is_product_category('YOUR CATEGORY PAGE NAME') || (is_product() && has_term('YOUR PRODUCT CATEGORY NAME FOR SINGLE PRODUCT PAGE', 'product_cat'));
        }
      );
    
      return $conditions;
    }

    After that go to menu item and you will see the new option ??

    • This reply was modified 5 years, 11 months ago by Programmer.
Viewing 1 replies (of 1 total)
  • The topic ‘Hide Menu on specific woocommerce single product’ is closed to new replies.