What should be right template for the WooComerce product page?
Problem: How to make that WooCommerce using single-product.php template, but single.php?
Solution: This problem arose because we using custom WooCommerce template overrides in our theme and we need to declare WooCommerce support using the add_theme_support function. WooCommerce template overrides are only enabled on themes that declare WooCommerce support. If you do not declare WooCommerce support in your theme, WooCommerce will assume the theme is not designed for WooCommerce compatibility and will use shortcode-based unsupported theme rendering to display the shop.
Declaring WooCommerce support is straightforward and involves adding one function in your theme's functions.php file.
<?php
add_action( 'after_setup_theme', 'enable_woocommerce_support' );
function enable_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
Sources:
Ich liebe diesen Beitrag!
Ich lese deinen Blog ziemlich oft und du kommst immer mit großartigen Sachen heraus.
Ich habe ihn auf Facebook geteilt und meine Follower haben ihn geliebt!
Machen Sie weiter so!
Danke!
¡Me encanta este post!
Leo tu blog muy a menudo y siempre ofreces grandes cosas .
Lo compartí en Facebook y a mis seguidores les
encantó.
¡Seguid con el buen trabajo!
Gracias!