Page restriction based on user meta
-
I am trying to restrict pages, based on User meta using the following code.
[useraccess json='{“RoleMeta”:”Admin”, ” RoleMeta”:”Subscriber1″}’ message=”You need permission to view this content.”]Restricted content.[/useraccess]
If the meta_key (RoleMeta) is either of (Admin or Subscriber1) the page should be displayed or else not.
“Admin” is able to view the page, but “Subscriber1” is not.
If I change the code to below, then “Admin” is restricted access:
[useraccess json='{“RoleMeta”:”Subscriber1″, ” RoleMeta”:”Admin”}’ message=”You need permission to view this content.”]Restricted content.[/useraccess]I want to display the content for both of these meta_key values.
Spent quite a lot of time, trying to figure out a way!!!!Help greatly appreciated.
Thanks,
Dinesh M
- The topic ‘Page restriction based on user meta’ is closed to new replies.