- This topic has 6 replies, 4 voices, and was last updated 6 years, 1 month ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Icon to show when logged in
Tagged: icon
Is there a way to show an icon when you are logged in?
e.g.
Something like a head and shoulders icon to the right of a top menu
Thanks,
Paully
Hi, can you provide an example for your request? This will help us understand what you are looking for.
Thank you
Yes, just like the little icon (hope you don’t mind me borrowing your logo as an example!)…
postimg.cc/tZqDg6S5
…so they can click that and log out or whatever.
It’s just a VISUAL reminder that they are logged in.
Do you follow me?
🙂
Paully
Hi, I have submitted a message to the developers to investigate further your request.
Thank you
This is something you will need to add to your theme using a custom code.
Code examples from here maybe helpful:
https://simple-membership-plugin.com/simple-membership-miscellaneous-php-tweaks/
In your themes header file you can do the following:
#) Check if the user is logged-in
#) Then output some HTML code that is a logout link with an image/logo as the anchor.
I am looking for help with this as well. I used:
`<?php if(SwpmMemberUtils::is_member_logged_in()) { ?>
//Your message for logged-in members goes here
<?php } ?>
If the member was logged in, I used PHP to add a class to the body tag. It worked! but then, when I disabled the plugin (temporarily), the code crashed my site. Do you know how I can avoid that from happening?
Thank you!
Alas, this worked and did not work 🙂
When I put the code in to my header.php file, the little line of text appeared but ONLY when I went to the site’s specific membership login page at /membership-login but not any other membership page or sub-page!?