$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>woocommerce offtopic - How to neutralize a parent theme php template?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

woocommerce offtopic - How to neutralize a parent theme php template?

matteradmin6PV0评论

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
Add a comment  | 

1 Answer 1

Reset to default 0

I'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.

Post a comment

comment list (0)

  1. No comments so far