plugin development - Wordpress use template

admin2025-06-02  1

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 A sample of your code with // insert template here would help, even pseudo code chunks to understand your flow. – Andy Macaulay-Brook Commented Mar 15, 2019 at 22:50
Add a comment  | 

1 Answer 1

Reset to default 0

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748801617a313836.html

最新回复(0)