How to give new users two specific user role options upon WordPress user registration
see register_form action hook for modifying the registration form add_action( “register_form”, function() { $html=”<p>”.__(‘Do you want to buy or sell?<br>Choose your role’).'</p>’; $html .= ‘<p>’; $html .= ‘<label for=”_customer”><input type=”radio” name=”user_role” id=”_customer” value=”customer”/>’.__(‘Customer’).'</label><br>’; $html .= ‘<label for=”_vendor”><input type=”radio” name=”user_role” id=”_vendor” value=”_vendor”/>’.__(‘Customer’).'</label>’; $html .= ‘</p>’; echo $html; } ); you can use user_register action to save … Read more