Archived topic
How to override generate-sections-page-template.php in theme?
4 replies · Started by madpiotr on October 13, 2015
I hope it is possible to override this template.
Hi madpiotr. There isn't really a clean way to override a file in a plugin. What is it you're wanting to change? If you're doing anything other than minor changes it may break the Sections functionality. If you're just wanting to add a bit of code then using a hook in the GP Hooks Add-on might be the way to go.
If you really wanted to, you could do something like this: https://gist.github.com/generatepress/84bae0e5ac0d94ce46f7
Then it would be looking for your template in your child theme called generate-sections-page-template.php.
As @bdbrown said, be careful changing stuff around as it could break the functionality of the plugin.
bdbrown gp-hooks would work form me but not in all cases. I wish to keep all my custom stuff in child theme
Tom, your solution works as a charm
I THANK YOU both.
I love to work with generatepress. Great work!
Awesome, glad that worked :)