Site icon Anthony Carbon

WooCommerce archive, and single product pages does not displaying the default layout

Hello guys, have you experience this issue on your current theme? WooCommerce archive, and single product pages does not displaying the default layout? Details show in one paragraph instead of grid? That means your current theme does not support Woocommerce and that’s what were going to do now. Just add the codes below and your theme will be WooCommerce supported. In my case, it is display all details in one paragraph instead of the grid of products or a product page with image and add to cart button.

I get it now, my custom theme is missing the theme support code for Woocommerce `add_theme_support( 'woocommerce' );`. To do that, I just copy the codes below and paste it into my functions.php inside of my current theme folder.

function mytheme_add_woocommerce_support() {
	add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );

That’s it! hope this help a lot.

Happy coding guys 🙂

Exit mobile version