The woocommerce_content() is a builtin WooCommerce function which allows you to create a new template page within your theme that is used for all WooCommerce taxonomy and post type displays.
While an easy catch-all solution, it does have a drawback in that this template is used for all WC taxonomies (product categories, etc.) and post types (product archives, single product pages). Developers are encouraged to use the hooks instead.
You’ll need to declare support for WooCommerce in your themes functions.php file:
1 2 3 4 | function mytheme_add_woocommerce_support() { add_theme_support( 'woocommerce' ); } add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' ); |
Hope this helps!
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.