Skip to content

WooCommerce Accordion Style Expand/Collapse Product Category Menu

Woocommerce Product Category Menu

Here is a jQuery solution for a WooCommerce accordion style menu for the product category menu that can be assigned with a WooCommerce widget, the menu works best when all product categories are assigned to a parent category. The Accordion menu will then expand and collapse on click with the first parent category appearing expanded,…

Read More

Limit the Words in WooCommerce Product Short Description

Woocommerce Product Short Description

WooCommerce has a filter that can limit the words in a product short description field  called ‘woocommerce_short_description‘ – coupled with an existing WordPress function ‘wp_trim_words‘ we can make the description any length to suit teasers, sliders etc and leave other areas where we want the full short description. View the code on Gist. In the…

Read More

Change WooCommerce Variation Dropdown Text

Woocommerce Dropdown Variation Text

You can change the default text in the product variation dropdown from ‘Choose an option‘…. to something else with the ‘woocommerce_dropdown_variation_attribute_options_args‘ filter. Add in your functions.php add_filter( ‘woocommerce_dropdown_variation_attribute_options_args’, ‘bt_dropdown_choice’ ); // /** * Change the custom dropdown “Choose an option” text on the front end */ function bt_dropdown_choice( $args ){ if( is_product() ) { $args[‘show_option_none’] =…

Read More

Remove WooCommerce SKU: N/A Category in Products

Remove Woocommerce Sku

You can remove the WooCommerce sku line – SKU: N/A Category from products in WordPress by using the ‘wc_product_sku_enabled‘ filter. Just add in your theme’s functions.php file… add_filter( ‘wc_product_sku_enabled’, ‘__return_false’ ); This will remove the sku everywhere. Remove the SKU Item Conditionally You may want to keep the SKU info published on some categories or products only – you…

Read More

Add WooCommerce MyAccount Page Login/Logout to Menu

This code adds a login/logout link to your WordPress primary menu to log the user into the WooCommerce My Account page and then also log out to the same or different page. It differs from the referred article as that adds the WordPress default login/logout page. The menus need to be registered via register_nav_menu and positioned with theme_location,…

Read More
Scroll To Top