Create page template via functions.php?

Question

I want to create a new selectable page template for users that will allow them to identify which pages on the site are “Service” pages (eg plumbing, gas fitting, etc). The template is an exact copy of page.php but includes some JSON LD (schema.org code) for “Service” pages on their website.

I really don’t want a whole new servicepage.php file for this, that is just a carbon copy of page.php.

(How) Could I do this using only functions.php? Adding a new plugin is not currently an option.

0
Drewdavid 1 month 2021-05-07T12:22:32-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse