$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'); ?>plugins - How to overwrite corelibrariesvendor template with child theme|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)

plugins - How to overwrite corelibrariesvendor template with child theme

matteradmin10PV0评论

A theme that I am using is overwriting the woocommerce templates with files in theme/core/libraries/vendor/woocommerce/templates folder.

I tried to overwrite some minor stuff by following the best practices - I placed the updated file in the same folder structure as the parent theme, and I also tried by placing it in theme_child/woocommerce/ folder as it's expected for plugin overwrites.

None of these gave me the desired outcome. The only way is to change the parent theme, which I want to prevent if possible.

My end goal is to change the HTML output which as far as I can see is in the template and not in any specific function that I can easily replace. I am not experienced in WP development so I might be missing some obscure detail.

A theme that I am using is overwriting the woocommerce templates with files in theme/core/libraries/vendor/woocommerce/templates folder.

I tried to overwrite some minor stuff by following the best practices - I placed the updated file in the same folder structure as the parent theme, and I also tried by placing it in theme_child/woocommerce/ folder as it's expected for plugin overwrites.

None of these gave me the desired outcome. The only way is to change the parent theme, which I want to prevent if possible.

My end goal is to change the HTML output which as far as I can see is in the template and not in any specific function that I can easily replace. I am not experienced in WP development so I might be missing some obscure detail.

Share Improve this question edited Jan 4, 2019 at 19:29 Stoinov asked Jan 3, 2019 at 18:40 StoinovStoinov 1115 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Try creating the same structure in your child theme.

child_theme/core/libraries/vendor/woocommerce/templates

Post a comment

comment list (0)

  1. No comments so far