lisamr
Forum Replies Created
-
Gotcha! I figured it was just that I didn’t understand how the code should be written. No worries! ?? That did the trick, thank you so much for your help! Again!
So I got the code set up but something must be off. I just had a user register and their user role was set to “No Role for this Site” instead of the role I wanted. Here is my code, my intention is for people who register with an email address of name@clinicalarchitecture.com to automatically be updated to the CA Employee Subscriber role:
add_action("um_registration_complete","um_042121_change_user_role", 1, 2 ); function um_042121_change_user_role( $user_id, $args ){ if( isset( $args['user_email'] ) ){ list($user, $domain) = explode('@', $args['user_email'] ); if ($domain == 'clinicalarchitecture.com') { wp_update_user( array( 'ID' => $user_id, 'role' => 'CA Employee Subscriber' ) ); } } }
Can you help me figure out what is wrong in the code above? Thank you so much!!
Oh wow! Super cool, thank you so much! ??
Just a heads up, I was able to figure out the issue! When editing the form, in the sidebar on the right at the very bottom is an option for “User Meta.” I had to add both of my custom fields to that area and now they show up!
I’m currently using the Divi theme. I swapped to the Twenty Seventeen theme and the issue still persists. Here are the screenshots:
So I don’t think it’s a theme issue?
Thank you!
Thanks for the replies! I checked the visibility dropdown on the fields, they are both set to “View Everywhere.”
While editing the form, I do see in the right-hand sidebar an option for “Make this profile form role-specific.” None of the options were selected so I tried selecting all roles and saving, but that didn’t make them visible either. I can still see the fields when editing my profile but they don’t show up on my profile after saving.
Here is another screenshot of the form settings and one of the field’s settings. Maybe I’m missing something?
Thanks so much!
Ahh, that makes sense. I will give that a try! Thank you so much!
Forum: Plugins
In reply to: [Collapsing Categories] Posts showing up twiceI figured it out. My posts had their subcategory and their parent category checked. Good to know!