- This topic has 3 replies, 4 voices, and was last updated 10 years, 6 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 › WP eMember Tweaks › Custom Logout Link
Tagged: Logout, logout tweeks
Hi,
I need to place logout link in the header of all pages when a user is logged in. What would be the php code to test if a user is logged in display the logout link and the associated link/action to log the user out.
thanks
You simply add ?event=logout
to your site URL to make the logout link. For example the following would be a logout link:
http://www.example.com/?event=logout
I want a similar thing: a text link in my header that says “Login” if user is not logged in and “Logout” if user is logged in. The link would go to a Login/out page with the login shortcode on it.
I’m not super PHP-savvy. Would someone be able to provide the code I could use to drop into my header.php file?
Thanks!