Title: crewsin08's Replies | WordPress.org

---

# crewsin08

  [  ](https://wordpress.org/support/users/crewsin08/)

 *   [Profile](https://wordpress.org/support/users/crewsin08/)
 *   [Topics Started](https://wordpress.org/support/users/crewsin08/topics/)
 *   [Replies Created](https://wordpress.org/support/users/crewsin08/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/crewsin08/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/crewsin08/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/crewsin08/engagements/)
 *   [Favorites](https://wordpress.org/support/users/crewsin08/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Automatically generated pages](https://wordpress.org/support/topic/automatically-generated-pages/)
 *  Thread Starter [crewsin08](https://wordpress.org/support/users/crewsin08/)
 * (@crewsin08)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/automatically-generated-pages/#post-1855748)
 * Hi guys after a solid night of trial and error i managed to come up with this.
   seems to work pretty well, if anybody has a better idea i am happy for input.
 * Simply copy paste into your functions.php file and it will take effect
 * /* CREATE NEW PAGE WITH USER, GIVE PAGE USER’S NAME*/
    function my_create_page(
   $user_id){ $the_user = get_userdata($user_id); $new_user_name = $the_user->user_login;
   $my_post = array(); $my_post[‘post_title’] = $new_user_name; $my_post[‘post_type’]
   = ‘page’; $my_post[‘post_content’] = ”; $my_post[‘post_status’] = ‘publish’; 
   wp_insert_post( $my_post ); } add_action(‘user_register’, ‘my_create_page’);

Viewing 1 replies (of 1 total)