BuddyDev

Search

[Resolved] Activity Stream On Profile

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #1492

    Hi @sbrajesh,

    Thanks for helping me get that activity stream fixed on my profile tab.

    I have one last thing that’s making me OCD.

    How can I make the post form not available unless the user is logged in?

    On all user profiles, the form is open to everyone who visits…they can’t post, but I think it will look better if the post form isn’t visible to logged out users.

    Thanks for all your help!

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #1493

    Hi Joshua,
    Thank you for asking.
    In your custom activity page, at the top, check if you have a code like this

    
    <?php bp_get_template_part( 'activity/post-form' ); ?>
    

    If you have it, please put it inside an if block like this

    
    	<?php if ( is_user_logged_in() ) : ?>
    
    		<?php bp_get_template_part( 'activity/post-form' ); ?>
    
    	<?php endif; ?>
    
    

    That will do it.
    Hope that helps.

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #1501

    @sbrajesh,

    Thanks again! I can’t believe it was that easy. I had actually cut out the template file html code from the template itself! It made my file look so much better.

    Thank you!

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #1504

    Thank you. I am glad it is all good now 🙂

The topic ‘ [Resolved] Activity Stream On Profile’ is closed to new replies.

This topic is: resolved