BuddyDev

Search

[Resolved] Hide the BP type box and MPP on Website Activity Page

  • Participant
    Level: Master
    Posts: 439
    Daniel on #47436

    Yo hi,

    I would like to hide the Buddypress “What’s new USER” type box on Website Activity Page and also the Mediapress upload buttons on https://www.mywebsite/activity

    I would like that only the activities are showing without the type box or MediaPress upload buttons.

    Is there a code that I could add to hide them?

    Thanks for your input.

    Regards
    Daniel

  • Keymaster
    (BuddyDev Team)
    Posts: 22216
    Brajesh Singh on #47437

    Hi Daniel,
    do you mean removing the label and the MediaPress buttons.

    You can disable uploading to activity from MediaPress settings. For label, Please let me know if it is the label or the whole posting box you want to remove and we will assit.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 439
    Daniel on #47438
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2505
    Ravi on #47446

    Hello Daniel,

    Please try the following code:

    
    add_action( 'bp_before_activity_post_form', function () {
    
    	if ( bp_is_activity_directory() ) {
    		ob_start();
    	}
    } );
    
    add_action( 'bp_after_activity_post_form', function () {
    
    	if ( bp_is_activity_directory() ) {
    		ob_get_clean();
    	}
    } );
    
    

    Let me know if it helps or not.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 439
    Daniel on #47447
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2505
    Ravi on #47458

    Hello Daniel,

    Please replace the old code with the following one:

    
    add_action( 'bp_before_activity_post_form', function () {
    
    	if ( bp_is_activity_directory() ) {
    		ob_start();
    	}
    } );
    
    add_action( 'bp_after_activity_post_form', function () {
    
    	if ( bp_is_activity_directory() ) {
    		ob_get_clean();
    	}
    }, 99 );
    
    

    MediaPress does hook its buttons on ‘bp_after_activity_post_form’ which is causing the issue.

    Please check now.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 439
    Daniel on #47475
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2505
    Ravi on #47515
    This reply has been marked as private.
  • Participant
    Level: Master
    Posts: 439
    Daniel on #47520
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 22216
    Brajesh Singh on #47541
    This reply has been marked as private.

The topic ‘ [Resolved] Hide the BP type box and MPP on Website Activity Page’ is closed to new replies.

This topic is: resolved