L
L
ligisayan2019-08-09 20:26:34
WordPress
ligisayan, 2019-08-09 20:26:34

Duplicate content in the product description tab on woocommerce - why?

Hello! There is an online store on wordpress + woocommerce. (woo latest version)
I have my own theme (tested with absolutely clean, where only styles.css and index.php and single-product.php files copied from plugin templates) and disabled plugins.
Faced such a problem: on the product page, for some reason, a duplicate of the content of the entire product is displayed in the description tab.
What could be causing this and how can it be fixed?
5d4dab86d2df3872953466.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
ligisayan, 2019-08-12
@ligisayan

Found the answer here. You need to write the following instruction
in functions.php :

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

The point is that if the theme does not declare that it uses woocommerce , then by default the templates will not be taken from the woocommerce folder in the theme, as we expect, but from the root, i.e. single.phpwill take precedence over the single-product.phpones in the theme subfolder
. Default themes are different in this respect, because woocommerce provides support for them from the very beginning.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question