@aswingiri Thank you for your response!
As I see this snippet apply this filter on all the websites pages, but as I have set some pages to be public and some private with access to a specific user role, this script for what I see runs on all pages, I need this filter to be applyed only on pages that are restricted on the backend.
For example:
Homepage –> Public
About us –> Public
..
..
..
Private Area –> Only who has an account with a specific role can access
Other private page –> Only who has an account with a specific role can access
..
..
Here the settings in the backend:
Restricted page:
https://ibb.co/hD7wb54
Public page:
https://ibb.co/98jtk8P
-
This reply was modified 4 years, 2 months ago by
kastriotsula.
Hello @kastriotsula
I have updated the snippet, please check it now. This should only add the script when the restriction message is displayed on-page. Let me know if this works.
-
This reply was modified 4 years, 2 months ago by
Aswin Giri.
Looks good to me! That’s exactly what I meant!
Thank you very much @aswingiri 🙂
-
This reply was modified 4 years, 2 months ago by
kastriotsula.
Sorry @aswingiri but see that the script still runs on pages that are not protected using Ulitmate member.
What can be the problem?
Thanl you again!
@kastriotsula I have tested this snippet and this seems to work fine. Can you please see if you have added script on any other places?
To make sure it is not the snippet, you can remove the snippet and see if the script still loads. If you have any caching systems on your server or website, please disable them and test it.