L
L
Lukin Danil2022-04-18 17:06:47
WordPress
Lukin Danil, 2022-04-18 17:06:47

archive-product.php not working on child theme?

Already went through a ton of forums, read the documentation and I don’t understand why the archive-product.php file in the child theme from twentytwentytwo does not work. The Woocommerce plugin is installed, you need to overwrite the archive-product.php file, in fact, for this you need to create a woocommerce folder in the theme, copy the archive-product.php file there and output whatever you like. I don't have a woocommerce.php file, i.e. should work exactly archive-product.php, however, so that I do not try all the changes are simply ignored. Woocommerce support has already been added to functions.php

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


For the sake of interest, I tried to edit this file even in the plugin folder - no changes. Please help me make it work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lukin Danil, 2022-04-19
@ld161100

The solution was to change the subject. Despite the fact that woocommerce support was added to functions.php, only changing the theme to Underscores saved me, I think changing to a theme like OceanWP would also help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question