I use to work a basic theme with a child-theme. The parent theme contains the woocommerce.php template, which I would like to disable in the child theme. I already used several codes in the child theme's functions.php, but none worked. Can anyone imagine how I can neutralize this template? Thanks in advance!
I use to work a basic theme with a child-theme. The parent theme contains the woocommerce.php template, which I would like to disable in the child theme. I already used several codes in the child theme's functions.php, but none worked. Can anyone imagine how I can neutralize this template? Thanks in advance!
Share Improve this question edited Nov 17, 2018 at 0:22 Rodrigo Grigoletti asked Nov 16, 2018 at 23:01 Rodrigo GrigolettiRodrigo Grigoletti 114 bronze badges 3- What do you mean "neutralize"? – Jacob Peattie Commented Nov 17, 2018 at 6:23
- Not clear your requirement. – vikrant zilpe Commented Nov 17, 2018 at 7:02
- Sorry guys, I meant disable that parent theme php template in the child-theme, but without overwriting it with another template. – Rodrigo Grigoletti Commented Nov 20, 2018 at 13:43
1 Answer
Reset to default 0I'm assuming that with 'neutralize' you mean de-register or remove, such that WC doesn't see (or recognize) the file and functions as it would have without the woocommerce.php
-file being there.
This answer proposes a code in which your child theme (by code) physically deletes the parent theme file. There's also a questions here that seems related to your problem.