- This topic has 3 replies, 3 voices, and was last updated 12 years, 4 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 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 › eMember – check if member has logged on
Tagged: check, check if user has page access, eMember, login
Hello all,
I need a way to check if a member has logged in from a .php file (not from within eMember itself). The .php file is associated with the home page of a template. So, the check needs to be able to run from header.php or from home.php or from footer.php.
TIA
Hi,
You can easily be notified when a member has logged in by using the following hook from eMember:
do_action(‘eMember_login_complete’);
Unfortunately an explanation of how to use WP hooks is out of the scope of this forum and I’m assuming you are a WordPress/PHP developer and you know what I’m talking about when I refer to “hook”.
Thanks for the response.
I am new to WP but will follow your instructions. Does this evaluate to a “1” or “0”?
The idea is to have one page for the “landing”. If the person has logged in, the menu will change to show Contacts, Prices, Staff, etc.
If the person has not logged in, then there will be nothing on the menu until they do.
Can you provide a quick example of just using this piece of code?
TIA
The example snippets on the following documentation might be easier for what you are after:
http://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248