• Resolved toulip

    (@toulip)


    Hello there,

    I was wondering if I can restrict a page to be visible to all logged-out users + one specific user role (if a user is logged-in) at the same time.

    Now, as I can see, I have the option to either restrict this to logged-out or specific user roles.

    I hope this makes sense.

    Thanks in advance,

    George.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @toulip – Interesting question. I don’t think the given options would allow it the normal way, but I wonder would 2 identical restriction sets with only the user status changed would conflict or work in tandem.

    My guess is probably conflict depending on the order they were loaded in, on would take priority.

    That said there are filters you might tap into and manually allow access additionally to the one user role: https://github.com/JunglePlugins/Content-Control/blob/7d5d379f85c8e087be87807749cee7003a8cd218/classes/Is.php#L79

    Hope that helps.

    Thread Starter toulip

    (@toulip)

    Hello Daniel,

    Thank you so much for this.

    I think that the filters solution you suggested is the best for now. Because I tried having 2 identical restriction sets with only the user status changed and that did not work properly.

    I will have to play with this by adding some custom coding to it.

    However, you can think of such a feature added in future plugin updates.

    That would be great and very helpful!

    Thanks in advance,

    George.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content for logged out and one user role’ is closed to new replies.