• Resolved Dave

    (@dcutri500)


    Hi.

    First, thank you for taking over this plugin. It’s the only one like it out there!

    Is there a way to make it work with custom roles? Currently, it only works with the default WordPress roles.

    Specifically, it’s the User Roles and Capabilities plugin that I need it to work with, but even if I don’t use that plugin and create my own roles in code, Multiple Roles will only acknowledge the default WordPress roles.

    Any help you can give would be greatly appreciated. Thanks again.

    I’m using the latest version of WordPress and the latest version of Multiple Roles.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Christian Neumann

    (@cneumann)

    Hey,

    the plugin should work with other roles as well. It will list all roles that you are allowed to edit. Maybe that is the problem? Check the return of WordPress’ function https://developer.www.ads-software.com/reference/functions/get_editable_roles/, this is used by the plugin to retrieve the list of roles you may select. The list might get altered by other plugins, so please check this without other plugins active.

    Best
    Christian

    Thread Starter Dave

    (@dcutri500)

    Hi. Thanks. No, I’m a Super Admin on the network, so that can’t be the issue.

    Okay, I assume it’s a problem caused by a conflict with the Roles and Capabilities plugin, but I’m gonna have to do some further testing.

    I see someone else raised that issue a while ago, but it was never resolved. I will see what I can find out and then maybe come up with a solution.

    Thanks for your time.

    Plugin Author Christian Neumann

    (@cneumann)

    Ok, let me know If you find out something.

    Thread Starter Dave

    (@dcutri500)

    Turns out it’s a server issue. Everything works as expected on every server I’ve tried, except for this particular server for some reason. I can’t imagine what the problem could be, but there’s nothing I can do about it because I don’t manage the server and they have no incentive to investigate it for me.

    Plugin Author Christian Neumann

    (@cneumann)

    Okay, thanks for the feedback.

    I have the same problem. The role is displayed and I can check the checkbox for the role. However, after saving, the page will show the role as unchecked.

    My role is registered as:

    add_role("Special Member", "Special Member");

    Thread Starter Dave

    (@dcutri500)

    Well, the issue is solved for me:

    Capital letters in the unique identifiers was the problem. Previously, I had this:

    My Role as the display name, and
    MyRole as the unique identifier.

    When I changed the unique identifier to:

    myrole

    then it worked!

    my-role also works.

    Saemideluxe,

    Try this and see if it fixes your problem:

    add_role("special-member", "Special Member");

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Use with custom roles?’ is closed to new replies.