In this tutorial, i’ll show you 2 ways to add a widget in Woo Commerce.
You can either:
- Use any Woo hook position in any Woo theme
- Use a Woo Commerce conditional tag with any StudioPress child theme
You can use the Woo Commerce plugin with any theme not just Woo themes.
If you install the plugin and use it with a StudioPress child theme, you also get to use any of the Genesis hooks & filters which give you more flexibility and ease of customization.
Adding Widgets To Woo Commerce On Woo Themes
The code above will only work with a Woo theme as it uses a Woo hook which can be changed.
Please copy ALL the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++
Alternatively, you can paste this code in the Custom Functions section of any Woo themes functions file.
But wait! I’m using Woo Commerce on Genesis.
Adding Widgets To Woo Commerce In Genesis
Here’s the code to add a widget on all product pages in any Genesis child theme when you have the Woo Commerce plugin installed.
The code above uses a Genesis hook and Woo Commerce conditional tag as well as adding support for the genesis-connect-woocommerce.
Note: You’ll also need to install the Genesis Connect for WooCommerce plugin.
- Add Custom Field Content Before & After WooCommerce Products
- Add Widget After Woo Commerce Single Product Pages in Genesis