Is there a way to redirect a user who logs in using wp_login_form to a custom page that is created automatically on signup
It seems like the URL needs to be absolute and obviously the end of the URL would change with each user.
Please see the function used to create the page on signup
function create_user_page($user_id) {
if ( $user = get_userdata($user_id) ) {
// Create a new user-specific page
$page = array(
'comment_status' => 'closed',
'ping_status' => 'closed',
'post_name' => $user->user_login,
'post_status' => 'publish',
'post_title' => $user->user_login,
'post_type' => 'page'
);
So, when a user logs in via the page that includes wp_login_form they need to be redirected to http://www.websiteurl.com/user1 etc. where user1 is the page that has been created.
I hope that made sense.
