Define template folder path when creating custom template

Stagger Lee
1796 Posts
Stagger Lee posted this 28 May 2016

Option like this would help a lot. All WordPress plugins allowing template overrides put its template files in theme subfolder.
If we can type what subfolder custom template goes it would make it lot easy to style output of many plugins.

For instance one real example:

  • Woocommerce PDF invoice plugin
  • It goes in "pdf_templates" subfolder in Themler theme, wp-content/themes/YOUR_THEME/pdf_templates/template.php
  • We could make one custom template with name "template.php" and just decide in what subfolder it goes.
  • Then simply use CMS code control to put all or some of the code from original plugins template file and continue to work and style everything in Themler, CMS controls mostly.

Almost all WP plugins (with overrides) work similar way, non of them usually put overrides in theme root folder.

Maybe smart would be not to mix this option with already exisiting Custom template options. Put it as new option under Add template - Custom template.

Option like this would help a lot. All WordPress plugins allowing template overrides put its template files in theme subfolder. If we can type what subfolder custom template goes it would make it lot easy to style output of many plugins. For instance one real example: - Woocommerce PDF invoice plugin - It goes in "pdf_templates" subfolder in Themler theme, wp-content/themes/YOUR_THEME/pdf_templates/template.php - We could make one custom template with name "template.php" and just decide in what subfolder it goes. - Then simply use CMS code control to put all or some of the code from original plugins template file and continue to work and style everything in Themler, CMS controls mostly. Almost all WP plugins (with overrides) work similar way, non of them usually put overrides in theme root folder. Maybe smart would be not to mix this option with already exisiting Custom template options. Put it as new option under Add template - Custom template.

Last edited 28 May 2016 by Stagger Lee

Vote to pay developers attention to this features or issue.
4 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 31 May 2016

Hello Stagger Lee,
thank you for your idea. I've passed it to developer team to consider it.

Regards,
Aileen

Hello Stagger Lee, thank you for your idea. I've passed it to developer team to consider it. Regards, Aileen
Stagger Lee
1796 Posts
Stagger Lee posted this 31 May 2016

Thank you Aileen.

Thank you Aileen.
Malinka
39 Posts
Malinka posted this 21 January 2017

Interesting idea Stagger hope Themler users vote for this option.
I struggle to get a simple solution to this problem.

Do you think it is possible to include all PHP files in one directory and put include code in Themler Edit CMS Code?

Themler Edit CMS Code Something like this:

$includes = array(
   'path/to/file.php',
   'path/to/another/file.php'
);
foreach($includes as $file) {
     include_once $file;
}

Best regards
Malinka

Interesting idea Stagger hope Themler users vote for this option. I struggle to get a simple solution to this problem. Do you think it is possible to include all PHP files in one directory and put include code in Themler Edit CMS Code? Themler Edit CMS Code Something like this: $includes = array( 'path/to/file.php', 'path/to/another/file.php' ); foreach($includes as $file) { include_once $file; } Best regards Malinka
Stagger Lee
1796 Posts
Stagger Lee posted this 21 January 2017

Hi Malinka

This one is more about editing options in TH and Live preview of changes in TH. Will see later how to include custom files.

Hi Malinka This one is more about editing options in TH and Live preview of changes in TH. Will see later how to include custom files.
You must log in or register to leave comments