Pro: How to add a new template in the "Page Attribute > Template" Drop-Down using a child theme?

How can I add a new template item (named e.g. “Legal”) under “Page Attribute > Template”?

I’m using a Pro and Child theme for the modifications.

I placed a new PHP file template-legal.php, in the child theme on the path:
\themes\childthemename\framework\legacy\templates\

This file is based on the existing Pro file template-blank-1.php in which I appropriately changed “TEMPLATE NAME” comment to:
// TEMPLATE NAME: Legal

However, the new template does not show in the drop-down.

CustomTemplate_Legal_2-2

What I additionally tried:
#1
I copied the existing template-blank-1.php in the child theme in the path: \themes\childthemename\framework\legacy\templates\
and added:

echo 'TESTING';

which outputs TESTING on the Front-End.

So, the directory path in the child theme is OK.

#2
I copied my template-legal.php in the Parent Pro theme on the path:
\themes\pro\framework\legacy\templates\

And the template does show in the drop-down.

CustomTemplate_Legal_ProFolder

So, my php file is OK.


What am I missing?
Can you please help me out?

Kind regards.

Hello @dasbios,

Thanks for writing in!

You should place your custom template file in the child theme’s directory:
\themes\pro-child\template-legal.php

It must contain the needed header, content, and footer WordPress code so that it will display the page properly.

Be advised that custom coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Best Regards.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.