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.