[Resolved] Text for logged in user only
-
Hey,
I’m using Buddypress for my website. I have created a notice for my users and I’m using this code:
<?php if ( is_user_logged_in() ) { echo '<span class="notice-user"> <div> You can send friend requests and Messages to this user </div> <span>'; } ?>
While this is working absolutely fine for the visitors, This code also shows up the notice if the user visits his OWN profile.
So, If user XYZ visits ABC. This notice should be there but if user XYZ visits his OWN profile i.e. XYZ’s profile, this notice should not be there.
Any idea How can I do that?
Thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.