I created a wordpress plugin that creates a page on activation and deletes it when deactivated (also does some other stuff but that doesn't matter for this context).
I want to set a custom template for this page and that template file should be located in my plugin folder. How do I do this?
I use wp_insert_post
to create the page and I know there is an option page_template
which I can set to a php file located in the theme folder. Is it possible to just put in a relative or absolute path to the file in my plugin folder? In my attemps that did not work. What's the best way to do this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire