standard custom page template hierarchy for plugins

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?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 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.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x