Support » Plugin: Content Mask » Using Content Mask with iframe option on Restricted Page

  • Resolved razvansocolov



    Here is my situation:

    I’m building an WordPress site with access roles, based on subscription.

    My restricted content page is like this: https:/
    It contains an masked iframe link like

    If I choose iframe method then it bypasses my restriction user roles.

    How can I fix this, to show the page only to specific registered users?

    Thank you!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Xhynk


    Oooh, that’s an issue I haven’t come across yet!

    The Iframe method basically replaces the entire page markup with a full page iframe, which would bypass restrictions like that. The only restrictions it does follow is the native “password restricted post” one.

    There are a ton of plugins/themes that integrate roles differently – would it be a workable solution to add a “restrict this content to these roles” on a per-page basis? Basically when you edit the mask, have a list of checkboxes/toggles that would allow it to show or not based on certain roles?

    If so, I think I could make that happen and push it out in an update this week?



    Oh, it will be so kind of you, if you do the upgrade!

    Yes, I’m using UserPro plugin, I’ve restricted the content to a specific role, but the page is displayed if I’ve masked, even I’m not logged in. So, it bypasses the role.

    Thank you so much, looking forward for the update!

    Plugin Author Xhynk


    Hey there!

    I don’t have access to the UserPro plugin, but I’ve built in a way to hide Masked Content from different user roles.

    In the metabox on each page/post, you can now check the box next to the user role you want to hide the masked content from. This can also be done from the quick menu (the “…”) in the admin page. Just click on “Role Permissions”, check the roles you want to <b>hide</b> the content from, and click finish!

    If that UserPro plugin uses standard WordPress roles, it should work. If not, let me know and we can collaborate a bit more.

    Thanks for the suggestion!



    Wow! You’re moving fast! Very much appreciated!

    I’ve upgraded the module and there are quite a lot of changes.

    I think I’ve got it, after a few quick tests!

    Cheers and cold beers from Romania!

    PS – If I found something that’s not quite right, I let you know!
    I salute you, be safe!

    Hello again!

    I found a little issue: there is no restriction for guests accounts. Can you add that option too?

    Here is my scenario: I’ve make a dedicated post for an ebook content that is masked for the real source. The ebook content is available through a link button from a presentation of product page. The button appears only after login/registration. But! If the user is smart enought to copy the link displayed on ebook page after login, the it can acces the link, regardless is login/registered or not. So, I think the major condition to the masked content is that the user must be loged in. If the ebook content is for a payed subscription, then I can make that post to be private and the role that can read private posts to be the subscription role.

    Thank you! You did a great job!! Looking forward to your response.

    Plugin Author Xhynk


    Hi Razvan,

    I’m a little confused on what exactly you’re asking for on this one. Are you just asking for another checkbox for just “is user logged-in”? If so, I can add that no problem

    Yes!!!! Please, add that checkbox “is user logged-in”.

    Thank you!

    Plugin Author Xhynk


    Ah, wonderful! I’ve added it in as a new set of permissions. Underneath “Role Permissions” is a new section called “Conditions”. Just toggle the one that you want to hide it from, (if “User Logged In” is checked, it will hide it from logged in users and show to logged out users. If “User Logged Out” is checked, it will hide it from logged out users, but show to logged in users)

    Let me know if that was what you were after, and let me know if you notice anything wonky about the update.


    Awsome work!! Thank you!
    If you cand add a close tab / button for the iframe, so the user can make another choice it will be wonderfull!
    If I can do that by script, please advice.

    Thank you again!

    Plugin Author Xhynk


    I apologize for the delay, I had to temporarily evacuate relocate due to the wildfires where I’m at.

    I was finally able to sit down and get some work done on this – I added an option “Return Link” option in version that adds a floating “< Go Back” link when turned on (this works on both the iframe *and* download methods!)

    Do note that it only works if the option is turned on AND there is an HTTP Referer set. Some browsers may not set one, and if your links to the pages include rel="noreferer", the Go Back link will not show up, otherwise, it will show up in the bottom left of the masked page when the option is on!

    Update should be live in a moment, so feel free to update and test it out!

    Jeez! Man, I hope that you’re ok! And the fire dind not rich to your place. I prayz for you!
    Thank you for all your support, take care!!

    Plugin Author Xhynk


    Thanks for the kind words! It stopped about 5 miles away thankfully, actually planning on heading back today – just the air quality is awful!

    Let me know if anything else comes up with Content Mask, or if that most recent update doesn’t work, and I’ll take a look as soon as I can.

    Take care!

    You have done an extraordinary job and I am very glad to hear that you are well!
    But now the most important thing is to take care of yourself and your family.
    We have time for the rest.

    Thanks again, my thoughts were on you.
    Be safe!

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.