Home › Forums › WP RESIDENCE – Real Estate WordPress Theme FORUM › Theme Code for Users to Agents
This topic contains 1 reply, has 1 voice, and was last updated by safecaches 2 years, 5 months ago.
I would like to know where the code is located that turns users into agents, I have been searching but cannot find, any help would be much appreciated.
Found it in a previous topic
Function is in ajax-login.php line 128
$post = array(
‘post_title’ => $user_name,
‘post_status’ => ‘publish’,
‘post_type’ => ‘estate_agent’ ,
$post_id = wp_insert_post($post );
update_post_meta($post_id, ‘user_meda_id’, $user_id);
update_user_meta( $user_id, ‘user_agent_id’, $post_id) ;
You must be logged in to reply to this topic.