Skip to:
Content
Pages
Categories
Search
Top
Bottom

Only display if user is viewing their profile


  • Wayn
    Participant

    @shnactor1

    Hi

    I would like to display some text on the users profile page only if they are viewing their profile page.

    If i insert the text in the home.php file it displays on the user profile page and when they are looking at other users profile pages.

    What conditional code would i use so that the user only sees the text when they are on their profile page.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

  • Bit Boy
    Participant

    @bitboy

    Hi,
    You can use bp_is_my_profile() to check and display content as below

    
    
    if ( bp_is_my_profile() ) {
    	echo "The content for profile owner.";
    }
    

    Best Regards
    B


    Wayn
    Participant

    @shnactor1

    Thank you @bitboy

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar