Categories
CMS Mastering Development Wordpress

Change user metadata on registration (show_admin_bar_front = false)

This is my first contact with WP Development, and I’m trying to not display the WP admin bar after the registration. Since it’s metadata called ‘show_admin_bar-front’, I’m updating that right after creating the user. if(count($error) == 0) { wp_create_user( $username, $password, $email); $user_id = get_current_user_id(); update_user_meta($user_id, ‘show_admin_bar_front’, ‘false’); echo “User Created Successfully!”; exit(); } As […]