Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created October 27, 2020 16:24
Show Gist options
  • Select an option

  • Save yousufansa/323eb692402d458110cc2ae28c65d260 to your computer and use it in GitHub Desktop.

Select an option

Save yousufansa/323eb692402d458110cc2ae28c65d260 to your computer and use it in GitHub Desktop.
Jobhunt - Disable User Role dropdown From Register Form & Make Employer as User Role
if ( ! function_exists( 'jh_child_register_form_user_role_as_employer' ) ) {
function jh_child_register_form_user_role_as_employer() {
if( function_exists( 'jobhunt_is_wp_job_manager_activated' ) && jobhunt_is_wp_job_manager_activated() ) {
?><input type="hidden" name="jobhunt_user_role" value="employer"/><?php
}
}
}
add_action( 'jobhunt_registration_form_fields_after', 'jh_child_register_form_user_role_as_employer', 99 );
add_filter( 'jobhunt_register_user_role_enabled', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment