Closed MikaBean closed 5 months ago
Hello Itthinx, can you provide me an answer please ? Have a nice day
Hi,
You cannot assign a role to a group. Within the design principles that Groups is based on, this would not be conceptually sound. However, you might find a solution like https://github.com/itthinx/groups-role-registration useful, that adds a user to a group based on role, a group named after the role is created automatically if needed.
Note that you will not be able to achieve this with any shortcode. The example you give is using a shortcode parameter which does not exist - see https://docs.itthinx.com/document/groups/shortcodes/groups_join/ for details on the supported parameters.
If you would like to add a role to a user as soon as a user is added to a particular group, you could use the groups_created_user_group action to implement the assignment.
As you can see, this will require a certain amount of coding, but if you are familiar with WordPress it's quite easy to do.
Cheers!
(resolved as above)
Hello, I've seen that this question has been asked already, but I need more information. I would like to automatically a specific role to a specific group. Can you help me ? I've tried different shortcodes like [groups_join role="GSS"] but none of them worked.
Thank you for advance