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 have a pretty good question here. I would like to create a hidden page on my wordpress blog for each user as they are registered. I already have most of the code of what needs to be put on the page with a simple shortcode. All I need is something to actually make the page. Here is some of my code.

function added($user_id)
global $wpdb;

// Create a page for the user with certain settings
add_action( 'user_register', 'added' );

function author_page($atts, $content = null)
    // Some code here on what to output on the page...
add_shortcode( 'author', 'author_page');

Well, that's pretty much what I've got with about 350 lines of code in the author_page function and some other stuff that the plugin will do. All I need to do, is in the // WHAT DO I PUT HERE!? bit, I need some code that will allow me to create a page, under the subheading authors, make it not seen on the dropdown of that menu page, and then put the shortcode [author id="1 or whatever it is"]Some description of the Author, or could be left out...[/author] on the page.

share|improve this question
up vote 0 down vote accepted
  • Create a custom post type named userinfo.
  • On 'user_register' call wp_insert_post() in your filter, and create a new post for the user. Add the user ID as post meta field.
  • When the new page is called on the front-end, display the user data.
share|improve this answer
Thank you so much. I actually found this but had to leave and couldn't post my findings. Thanks! – Ethan Brouwer Oct 30 '12 at 11:02

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.