In my wordpress plugin, I want to generate a page on the fly.
I could create a page for me. But I would rather not take any steps for them. Just let them activate it and it works.
So, I was wondering if there is a way to do this that supports all the functionality of the plugin.
My initial idea was to add a rewrite rule
add_rewrite_rule ('my_page / $', 'wp-content / plugins / my_plugin / page.php', 'top');
Then in my plugin I can have page.php. This works well, but I cannot get the header / footer, etc.
I am very new to Wordpress, so the odds are that I don't see anything obvious.
source
share