Support » Fixing WordPress » 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">
    <p> You can send friend requests and Messages to this user</p>

    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 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Text for logged in user only’ is closed to new replies.