Skip to:
Content
Pages
Categories
Search
Top
Bottom

Only display profile-loop section to profile owner


  • rezon8dev
    Participant

    @rezon8dev

    Hello Community!
    I have added some galleries from rtMedia to my profile-loop.php. I’d like for this new section to only display to the owner of the profile when on their profile tab. So the logged in user is on their own profile they will see the section and only in this case. All users would only see this section if they are on their profile and only see their galleries. Can anyone give me a hand? Currently I have a membership (pmPro) conditionally displaying this section based on a membership level but all members see the section on other members profiles….
    Using the KLEO theme and everything is at the most current versions.
    shpromodev.wpengine.com

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

  • shanebp
    Moderator

    @shanebp

    It’s probably a matter of adding a simple conditional.

    if( bp_is_my_profile() ) 
        // code to show the galleries

    If you added the galleries manually to profile-loop.php, then the conditional could go there.
    Have you asked rtMedia ?


    rezon8dev
    Participant

    @rezon8dev

    That did it – Thank you!
    Just in case any one else finds this

    <?php if(bp_is_my_profile() ) : ?>
    
    // code goes here
    
    <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only display profile-loop section to profile owner’ is closed to new replies.
Skip to toolbar