Simple Membership Plugin › Forums › Simple Membership Plugin › Show/Hide widgets for specific User Level
Tagged: Membership Level, User Level Permission, Widget
- This topic has 10 replies, 3 voices, and was last updated 8 years, 10 months ago by
mbrsolution.
-
AuthorPosts
-
November 15, 2015 at 6:57 pm #3991
Crissti
ParticipantHello, i’m using this code
SwpmMemberUtils::get_logged_in_members_level() == 2to show widget for specific user access level. It’s works in combination with a plugin called “Widget Logic”…The problem is that I want to add one more level at the same widget and I don’t know how…
Can you help me please?
November 15, 2015 at 9:26 pm #3992mbrsolution
ModeratorHi are you trying to retrieve which membership level is logged in?
November 16, 2015 at 8:47 am #3996Crissti
ParticipantYep.
November 16, 2015 at 9:14 am #3997mbrsolution
ModeratorHi have you read the following documentation?
November 16, 2015 at 9:45 am #3998Crissti
ParticipantYes I read it. From there I get the code. Some friend of mine, help me with this and now he’s busy and I have to solve this problem.
What I want to do more exactly: I have a widget for featured posts from a specific category, right? Well, I want to restrict this widget to appear to users with level 2 and 5 for example.
This code
SwpmMemberUtils::get_logged_in_members_level() == 2show the widget for users with level ID 2 (2 is the ID of membership level). I want to add one more ID for another users level and I can’t figure it out how.I’m not so good at php…
November 16, 2015 at 10:18 am #3999mbrsolution
ModeratorHi, did you by any chance have a look at the following plugin?
November 16, 2015 at 10:35 am #4000Crissti
ParticipantNope, I will try it. Thank you very very much!
October 12, 2017 at 11:54 am #12140rajveer
ParticipantHi, i am trying to retrieve membership level of all the members without logged in . So, that i can display the membership level just in front of username whether the user is premium,featured or free. i have a search filter and i want name and membership-level of that User should be displayed.
i have used the above code but it shows the membership level of a logged in user i don’t want to display the logged in membership level.
Rajveer singh
October 13, 2017 at 4:22 am #12144mbrsolution
Moderator@rajveer, can you start a new support thread.
Thank you
October 13, 2017 at 10:18 am #12146rajveer
Participant@mbrsolution, can i have an id of an user if i am having its email-id.
For eg.
Suppose i am having an user xyz@gmail.com… i am just having the user email-id. Now i want to fetch the ID(Primary ID) of an user to whom this email-id is registered.
Please help me in this i’ll be thankful to you.
lovely plugin.October 15, 2017 at 12:48 am #12157mbrsolution
ModeratorHi, try the following documentation. And also check the following documentation. Let me know if this helps you.
Thank you
-
AuthorPosts
- You must be logged in to reply to this topic.