I'm working with a custom plugin that will create virtual pages using regex. I'm trying to figure out how to tell my custom pages to use a certain template from the theme. How would I go about that?
I'm working with a custom plugin that will create virtual pages using regex. I'm trying to figure out how to tell my custom pages to use a certain template from the theme. How would I go about that?
Share Improve this question asked Mar 15, 2019 at 22:12 Dominick AllenDominick Allen 11 bronze badge 1 |1 Answer
Reset to default 0Maybe single_template or template_include filters would help you achieve the result you want?
You can use either of those filters to change which template WordPress loads for your content.
// insert template here
would help, even pseudo code chunks to understand your flow. – Andy Macaulay-Brook Commented Mar 15, 2019 at 22:50