I stumbled on a Problem recently:
I have a Registration Form on my Website which gives the role "Subscriber" by default to everybody who tries to register, but I want a specific E-Mail Domain to get a different role. I found a WPSE question about this but I don't know where I should insert the PHP Code? functions.php in my Themes folder? I would be really thankful if someone with more knowledge could help me.

I'm using WordPress 5.4.2 with WooCommerce and the Theme Shop-Isle


1 Answer 1


Yes, add the code in functions.php file of the activated theme.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.