Vasco_r6
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [WooCommerce] Grouped Products default quantityThanks.
I’ve changed the code in this way and obtained the result:
'input_name' => 'quantity[' . $product_id . ']', 'input_value' => ( isset( $_POST['quantity'][$product_id] ) ? wc_stock_amount( $_POST['quantity'][$product_id] ) : 1 ), 'min_value' => apply_filters( 'woocommerce_quantity_input_min', 0, $product ), 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product )
Yes thanks, it was simpler than I thought..
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Navigation problemThanks, this solved my problem for the parent butnot for the childs.
add_filter( 'nav_menu_css_class', 'namespace_menu_classes', 10, 2 ); function namespace_menu_classes( $classes , $item ){ if ( get_post_type() == 'event' ) { // remove unwanted classes if found $classes = str_replace( 'current_page_parent', '', $classes ); // find the url you want and add the class you want $url = $item->url; if ( strpos($url, 'events' ) !== false){ $classes = str_replace( 'menu-item', 'menu-item current_page_parent', $classes ); } } return $classes; }
ex.
parent “events”
— child “events/category”
— child “events/locations”
Any suggestion?I’ve installed only the italian language pack and in other places the booking word is correctly translated…
If possible I need a definitive solution also for future updates…Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Navigation problemI’ve placed this code in functions.php of the theme but it doesn’t work:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
// highlight active custom post page in nav add_filter( 'nav_menu_css_class', 'namespace_menu_classes', 10, 2 ); function namespace_menu_classes( $classes , $item ){ if ( get_post_type() == 'events-manager' ) { // remove unwanted classes if found $classes = str_replace( 'current_page_parent', '', $classes ); // find the url you want and add the class you want if ( $item->url == '/events' ) { $classes = str_replace( 'menu-item', 'menu-item current_page_parent', $classes ); } } return $classes; }
Viewing 5 replies - 1 through 5 (of 5 total)