During my wordpress wordpress plugin, I wish to produce a page quickly.

I possibly could possess the user produce the page for me personally. However I prefer to not have access to them inflict steps. Just allow them to activate it and delay pills work.

So I'm wondering it is possible to way that i can do that, which keeps all of the functionality inside the wordpress plugin.

My primary idea ended up being to give a rewrite rule

add_rewrite_rule('my_page/$', 'wp-content/plug ins/my_wordpress plugin/page.php', 'top')

Then during my wordpress plugin I may have a page.php. Which is effective, however i cannot obtain the header/footer etc.

I'm very a new comer to wordpress, so odds are i'm missing somethign apparent.

You can produce a 404 page code snippet that does wordpress_place_publish() after which redirects the consumer into it.

Your theme's 404.php would seem like this:

$post_id = wp_insert_post("post_title" => "my post title", "post_content" => "Lol");
header("location:" . get_permalink( $post_id ) );

You'll find the solution and sample code within this publish around the Wordpress forums: