-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template overrides? #1
Comments
Must be possible! |
@jameskoster @kloon What if you try do that with template_include? I think would be awesome for the plugin to have this filter inlcuded. |
+1 on this It should have a specific folder where we could put the same files we could override with a child theme, like header.php, footer.php etc... It should also have a "woocommerce" sub-folder in order to override WooCommerce's template files, emails, etc... |
Filters `template_include`. Gets the requested template, checks if that file exists in the plugin and loads it.
👍 |
1 similar comment
+1 |
To my knowledge, template partial overrides aren't currently possible :( |
So I tried to override a WooCommerce template (cart/cart.php) by placing it in So I wasn't sure if the commit by @jameskoster actually implemented that request mentioned by @webdados above... So I went ahead an implemented a separate route that uses wc_get_template and looks in It can be found here: #11 |
Please NO! Why can't changing-a-template-file simply be done with hooks in |
Storefront seems kind of like a fail. I can't believe that WooCommerce didn't provide a way to create custom pages that don't get overriden on theme updates. This is bad dev and planning by Woothemes |
It's as much a WordPress thing as a Woo thing. Using a child theme from any theme author will make template overrides tricky because WordPress core doesn't allow a level beyond child themes (grand-child themes). There are plugins to enable this functionality if you need it. Alternatively you can use page builders or create your custom pages using hooks / filters. |
needed to know more about this which is on the homepage of this git repository. "= Should I put all my customisations in this single plugin? = so how exactly is that done? how do we duplicate it? where do we put it? and what name do we give it? give an example if possible. all i know is that i am trying to put different modifications that go in functions.php (the original one), and trying to put them in the functions.php file inside of theme-customisations, and it doesn't always work. some modifications work and some don't. would like to know how to make more modifications work without editing the original functions.php file. thanks. |
@leoarce depending on when / where the action is supposed to fire, complications can happen. Just make a blank child theme like this example one: |
Easiest way to duplicate is to download a fresh copy of the plugin, open up Upload it to your You can name it anything you like. If you're creating a separate plugin per customisation then use something descriptive. |
What about theme/template overrides? Perhaps there is a way we can make the plugin modify the order WordPress looks for overrides to first check this plugin folder for the overrides and then proceed with the usual order of checking?
The text was updated successfully, but these errors were encountered: