- This topic has 1 reply, 2 voices, and was last updated 10 years, 9 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.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Using the "If Member is logged in" script
Tagged: php, user login
I tried using the following script on my site, but it shows even when no member (including myself) is logged in. Do I have to add it to a particular part in my page? I’m using it in an html block in Visual Composer.
<?php if(SwpmMemberUtils::is_member_logged_in()) { ?>
//Your message for logged-in members goes here
<?php } ?>
Any help would be appreciated, Thanks!
Hi, you need to add the function to a page template. When you create a page in your website you will select a template for that page. This is the template that you add the above function to.