We have "Reviewer Register page" on front-end form. There is a custom post type "Reviewers" to see reviewers lists.
When you register as a reviewer, a custom post is created with the reviewer name.
This works fine with front-end register form.
My problem is when you add "a reviewer" on back-end users page. Add a user and give him/her a role "reviewer"
But I don't know how to add a post on a custom post type (Reviewers)
My front end form add a post on a custom post type (Reviewers). but Not back-end users menu
Is there any filter for handling register or login functions on back-end or anything related login/register?
we need to add a function when you add / change a user on back-end user page.
This is how we add the user information to custom post type ("reviewer") on FRONT END.
if($edit) $args["ID"] = $edit->ID; $user_id = ($edit) ? wp_update_user($args) : wp_insert_user($args); if(!$edit && $kko_ut=='reviewer') wp_insert_post(Array( "post_title"=> sprintf("%s %s", $fields['first_name'], $fields['last_name']) , "post_content" => "" , "post_status" => "publish" , "post_author" => $user_id , "post_type" => "reviewer" ));
We need that it works when you add users on users page on BACK END as well.