Tips and Tricks HQ Support Portal › Forums › WP eMember › If exists a shortcode to show an array of all the membership levels ID of a user
- This topic has 8 replies, 3 voices, and was last updated 6 years, 11 months ago by
vinay samant.
-
AuthorPosts
-
October 16, 2018 at 12:53 pm #15155
3ddsa
SpectatorHi,
I have a site that uses multiple membership levels.
I would need to know if exists or is possible to have a shortcode that shows an array of all the membership levels IDs of a user.
I would need to use it with another plugin to make a conditional check and display content, as with section protection of WP eMember I can not get the desired results.
I’m not a php expert, if possible to have a suggestion on how to proceed, thank you.
October 16, 2018 at 7:17 pm #78670wzp
ModeratorThe only way to do this is with the following PHP code:
<br />
$all_level_ids = emember_get_all_level_ids_of_a_member($member_id);<br />This causes each element of the array $all_level_ids to contain the membership level ID that $member_id belongs to.
October 27, 2018 at 8:01 pm #78671vinay samant
Memberwhat plugin are you using to show specific posts as per membership? and how to use above code in this plugin?
October 28, 2018 at 12:24 pm #78672wzp
ModeratorVinay, please provide more context, regarding your question.
October 30, 2018 at 3:20 am #78673vinay samant
Membersorry admin,
the question was for “3ddsa” who said “I would need to use it with another plugin to make a conditional check and display content” …
i also need similar provision where user will see only posts from the subscribed categories in his user-area. i was wondering if such thing available. I m using “Content Views” plugin, but how to pass registered categories to “CV” to show only those content..
October 31, 2018 at 1:40 pm #78674vinay samant
Memberhow to get list of categories to which membership levels of user are associated with? or accessible to?
means, if my membership levels are 1,7 and categories permitted in those levels are 22,31 & 16, how can i know it??
November 20, 2018 at 5:43 am #78675vinay samant
Memberhello??
November 20, 2018 at 2:14 pm #78676wzp
Moderator…the question was for “3ddsa” who said…
And that’s why none of us has responded.
how to get list of categories to which membership levels of user are associated with? or accessible to?
Please review this thread, and see if it helps:
December 4, 2018 at 6:09 am #78677vinay samant
Membersorry for misunderstanding..
-
AuthorPosts
- You must be logged in to reply to this topic.