admin管理员组

文章数量:1323688

I know woo-commerce has it's own way of providing custom php templates in a child theme for its various views. I'm wondering if all plugins adhere to a standard way doing the same. For example, I'm using a plugin with a template located at wp-content/plugins/PLUGIN_NAME/templates/view-x.php. Is there a standard location in my child theme that I can create my own custom view-x.php that will override the default version? Or does it vary from plugin to plugin?

I know woo-commerce has it's own way of providing custom php templates in a child theme for its various views. I'm wondering if all plugins adhere to a standard way doing the same. For example, I'm using a plugin with a template located at wp-content/plugins/PLUGIN_NAME/templates/view-x.php. Is there a standard location in my child theme that I can create my own custom view-x.php that will override the default version? Or does it vary from plugin to plugin?

Share Improve this question asked Sep 3, 2020 at 12:44 Daveh0Daveh0 1912 silver badges13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

There's no standard way to replace plugin files from a theme. It's up to each individual plugin to provide support for this, and many don't. If a plugin does support it, the correct way to do it would be specific to that plugin. You will need to consult a plugin's developer documentation to see whether or not they support anything like this, or an alternative.

本文标签: standard custom page template hierarchy for plugins