Save multiple checkboxes with Types

Remove apply_filters() and just pass the array values into your wp_insert_user: array( ‘first_name’ => $nombre, ‘last_name’ => $apellidos, ‘user_pass’ => $contrasena, ‘user_login’ => $username, ‘user_email’ => $email, ‘role’ => ‘subscriber’, ) WordPress already managed those apply_filters, so there’s no reason to use them in your code. Hope it helps! Me dices si te sirvió, también … Read more

Custom user meta values in shortcode

You didn’t mention whether users could only reach this page when logged in, so this example includes a check to make sure the current visitor is logged in, otherwise it won’t output anything. <?php // create the shortcode add_shortcode(‘wpse_312268_show_cc_info’, ‘create_wpse_312268_shortcode’); function create_wpse_312268_shortcode() { // only do something if user is logged in if(is_user_logged_in()) { // … Read more

Custom user meta data [closed]

Read up on the documentation for the filter login_redirect And also see the answer to this question already answered I’m not totally sure what you are trying to do with the PIN – is that sent to the user via text/email or displayed on the page? Either way, the page you redirect to would need … Read more

how to add radio field on user meta on function.php?

You are using the wrong name on the radio inputs, radio-inline but when you try to get that value you are using $_POST[‘gender’] I’ve updated you code and made some improvement too, with the checked() function function show_extra_profile_fields( $user ) { $gender = get_user_meta( $user->ID, ‘gender’, true ); ?> <section> <label class=”label” for=”gender”>Gender</label> <div class=”inline-group”> … Read more