Override a template - Qreatix
The Qreatix Pro plugin prints the header, footer, blog, portfolio and other parts of the site from template files in its templates folder. A child theme can replace any of them without touching the plugin, so an update does not erase your change.
#Replace a template
Find the template
Open wp-content/plugins/qreatix-pro/templates/. The folders are blog, career, footer, front-scene, global, navigation, other, page, portfolio and shop. The path of a template is the file path inside this folder without .php. For example footer/cta.php has the path footer/cta.
Copy it into your child theme
In your child theme, create a folder named jkd-templates and copy the file there, keeping the same subfolder. For the call to action the copy goes to jkd-templates/footer/cta.php.
Edit the copy
Change the markup in your copy. The file also receives any variables the plugin passes, and they are available as $args as well as individual variables.
Reload the page
The plugin looks for jkd-templates/<path>.php in the active theme first, and falls back to its own file. Reload the page to see your version.
The folder must sit in the child theme while it is active. The lookup uses the active theme's directory, so a jkd-templates folder in the parent theme is not read.
A copied template does not follow plugin updates. When the plugin changes its version of the file, compare your copy with the new original and merge the differences.
#Before you copy
If you only need to change a text, an array of values or a query, use a filter instead. A filter keeps working through updates. See Filters and hooks. For the general idea behind child themes and overrides, see Child themes, template overrides and hooks.
Last updated
Was this article helpful?
On this page