Integration with Avada theme role manager
-
Hi, I created a new role “company” to manage the the capability as we need. everything works fine, but in Avada Builder Options > Role Manager section, the “company” role does not appear.
I tried just for a test to add a new role from functions.php, which works fine with the Avada role manager with no issue.
But if I made any change to the role capability with the Members plugin it would disappear again from Avada Builder Options.I tried a different method to register the Members plugin roles with Avada theme but unfortunately didn’t work with me.
add_action( 'members_register_roles', 'register_members_roles_with_avada' ); // Hook into Members' role registration function register_members_roles_with_avada() { // Get roles registered by Members plugin $members_roles = members_get_roles(); // Get existing Avada roles $avada_options = get_option( 'fusion_options', array() ); $avada_roles = isset( $avada_options['user_roles'] ) ? $avada_options['user_roles'] : array(); // Merge the roles and update Avada options $merged_roles = array_merge( $members_roles, $avada_roles ); update_option( 'fusion_options', array_unique( $merged_roles ) ); }Do you have any suggestions?
The page I need help with: [log in to see the link]
The topic ‘Integration with Avada theme role manager’ is closed to new replies.