• Resolved baponline

    (@baponline)


    Is it possible to automatically change content restriction on multiple pages?

    For example, I recently created a new User Role called “Tenant”.
    It has alot of the same features and accessibility as an existing User Role called “Resident”.

    I have multiple pages/posts (greater than 30) that Resident role can access. I would like the Tenant role to be able to access almost all of them (maybe 25).

    It would be great if I could automatically update all the pages that allow Resident role to access them to also allow the new Tenant role, rather than manually opening up all of the pages and changing the content restriction. If I could do this then I would only have to manually edit just a few pages and remove the Tenant role access that was automatically applied.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @baponline

    I suggest that you change the assignment of Roles instead of changing content restriction for specific user roles.

    E.g. When a user register, assign a “Subscriber” role. The Subscribers don’t have access to all pages, but when you upgrade their account by re-assigning the role from Subscriber to “Tenant” , they should see those Pages.

    Let me know if this makes sense.

    Regards,

    Thread Starter baponline

    (@baponline)

    Thanks for quick response. I think I understand your response re: assignment of a role to a user but not sure it addresses my problem or at least I don’t fully understand how to apply it. Maybe you can provide an example? Or perhaps I didn’t explain it properly.

    For example, assume I have 5 different pages with content restriction set to allow Resident role access. I just created a new role called Tenant that didn’t exist when I first created the 5 pages. Four of the 5 pages that allow Resident need to now also allow Tenant role access.

    I have users that are assigned Resident role and others that get Tenant role.

    I can manually go to those 4 pages and edit the content restriction to allow Tenant role. I was wondering if there was a way (ie, script, SQL, etc.) that would allow me to do this automatically vs. manually. Something that would go through and for every page that has content restriction set to allow Resident Role then update it to also allow Tenant role.

    It’s not a big deal if there are only 4 pages. But just becomes a manually intensive process when dealing with a larger number of pages.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @baponline

    UM Content restriction settings are stored in the wp_usermeta table. You can look for the meta key um_content_restriction. You can copy the meta value and save it to other pages.

    Regards,

    Thread Starter baponline

    (@baponline)

    Thank you! That definitely helps.

    Thread Starter baponline

    (@baponline)

    this resolves my question

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @baponline

    Thanks for letting us know. I am closing this thread now.

    Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I auto change content restriction on multiple pages?’ is closed to new replies.