- This topic has 3 replies, 2 voices, and was last updated 10 years, 3 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.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Dynamic greeting and welcome message for users
Tagged: greeting
Hello all, great plug-in by the way. I have looked for an option that allows to set a greeting for instance, to those who are not logged in already something like “Welcome, please register to access…” and another message like “Hello John! welcome to our site…”
Is this possible? I have looked all options and plug-ins and haven’t been able to get it.
Thanks in advanced,
J.
Hi, please check the following Miscellaneous PHP Tweaks.
Thank you
Thanks for your answer.
I added this as a code block to a page:
<?php if(SwpmMemberUtils::is_member_logged_in()) { ?>
<?php
echo ‘logged-in’;
?><?php } ?>
<?php if(!SwpmMemberUtils::is_member_logged_in()) { ?>
<?php
echo ‘Log in to start your free delivery.’;
?>
<?php } ?>
But it’s not working.
Can you help?
Thanks.
Hi, why don’t you try something like this.
Show specific content to a particular member
The following code will show a message to the member if his/her ID is “2”:
$member_id = SwpmMemberUtils::get_logged_in_members_id();
if ($member_id == "2"){
echo "Hi, your member ID is 2";
}
or you can use the following example, to add conditional block (for example: show a special message to your logged in users):
<?php if(SwpmMemberUtils::is_member_logged_in()) { ?>
//Your message for logged-in members goes here
<?php } ?>
Regards