- This topic has 1 reply, 2 voices, and was last updated 12 years, 3 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › Call current users membership level using php
Tagged: call membership level, membership php
Hello,
I would like to be able to use php in a page to call the current logged in user’s membership level. I am creating a control panel for users and their membership level determines what links they can click on. I don’t want to have to create a different page for each membership level. Instead I would like to call their membership level via php and use it to change what is displayed on the page.
Im not exactly new with php but I am by no means an expert so some explanation may be needed.
Here is an exact example of what I would like to do:
I have a button which I would like to send different users to different places, determined by their membership level. I already have a url for each membership level, and the url uses the exact eMember membership level name in the url. So i could simply put a <php echo “Membership level” ?> in the url. To me this is the simplest solution however i dont know what to echo or what templates etc need to be in place to do such an operation.
Thanks!
The examples on this document should help:
http://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248
There is also a shortcode you can use which displays the membership level of the logged in user:
[wp_eMember_user_details
user_info=”user_membership_level_name”]
See the shortcodes doc here:
http://www.tipsandtricks-hq.com/wordpress-membership/wp-content/uploads/eMember_shortcodes.pdf