Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('if_menu_conditions', 'my_new_menu_conditions');
- function my_new_menu_conditions($conditions) {
- $conditions[] = array(
- 'id' => 'bagdome', // unique ID for the rule
- 'name' => __('Ean Bagdome.gr'), // name of the rule
- 'condition' => function($item) { // callback - must return Boolean
- return in_category('bagdome-gr') || is_product_category('bagdome-gr') || (is_product() && has_term('bagdome-gr', 'product_cat'));
- }
- );
- return $conditions;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement