How to assign a custom gender to a user role?


I’m looking for a way to assign a custom gender I created to a user role.
I have also created very specific custom roles for this, but for the example, let’s say that I would like as soon as a user becomes administrator he is assigned a gender with a “female” value, or as soon as he becomes a subscriber, the value changes to “male”.
I know how strange it sounds, but behind this there are membership mechanics etc.

I searched on the net but I didn’t find many concrete examples for this scenario.
Is it possible ?

I found a question here for assigning avatar to a role, or another question for saving user meta based on user role, but I can’t seem to use this as a basis.

Could I get some help with this please?

g_p_to 2 months 2022-09-23T17:55:11-05:00 0 Answers 0 views 0

Leave an answer