WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a Wordpress plugin handling a calender in which it is possible to sign up for a given event. As part of this, I want to make a custom page for the signup-form and confirmation message to the client, however I have no idea how to do this.

I have seen that there is a wp_insert_post() function to insert a new post, but I need a page with custom plgin content (signup form) instead.

Is this even possible to do and how do I do this if it is?


share|improve this question
up vote 1 down vote accepted

You can use wp_insert_post for creating the page.

    $content = '<Sign up form content>';
        'post_title' => 'My page',
        'post_content' => $content,
        'post_type' => 'page', //VERY IMPORTANT
        'post_status' => 'publish/draft'

Check it.

share|improve this answer
Just one more question: how do I then access this page using a link? – Simon Aug 23 '12 at 8:02
Check the Pages section for your custom page and check it's permalink. – Rutwick Gangurde Aug 23 '12 at 8:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.