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?
Maybe 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