As we know that WP has a feature called Page_Templates. But today, I got a question in my mind that can we add/use/access multiple page templates from single .php file (which is responsible to call page template.)
For example first 40 lines of demo-xyz.php will echo a "demo" page template and then after left lines echo a "xyz" template. then i want to select both as page template for different two pages in wordpress>pages>addnew>page attributes>select page template. (there both 1.demo & 2.xyz template name should be shown)
/* Template : demo */ ....Codes For template demo /* Template : xyz */ .... Codes for template xyz
Reason - I have multiple page templates and i am finding me unable to manage too much template files that's why i wanna it's solution.
I searched everywhere for it but not find out a solution anywhere