Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove “replies”


  • eigodeasobo
    Participant

    @eigodeasobo

    Hi there

    I want to remove “replies” on subnav.

    I can remove “mentions” with code A, but can not remove “replies” with code B.

    Why??

    code A:

    function my_remove_mentions_subnav(){
    	global $bp;
    	if ( $bp->current_component == $bp->activity->slug ) {
    		bp_core_remove_subnav_item( $bp->activity->slug, 'mentions' );
    		bp_core_remove_subnav_item( $bp->activity->slug );
    	}
    }
    add_action( 'wp', 'my_remove_mentions_subnav', 2 );

    code B:

    function my_remove_replies_subnav(){
    	global $bp;
    	if ( $bp->current_component == $bp->forums->slug ) {
    		bp_core_remove_subnav_item( $bp->forums->slug, 'replies' );
    		bp_core_remove_subnav_item( $bp->forums->slug );
    	}
    }
    add_action( 'wp', 'my_remove_replies_subnav', 2 );

    Thanks.

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

  • Prashant Singh
    Participant

    @prashantvatsh

    Hi, Please try the following code:

    function my_remove_replies_subnav(){
    	global $bp;
    	if ( $bp->current_component == $bp->forums->slug ) {
    		bp_core_remove_subnav_item( $bp->forums->slug, 'bbp-replies' );
    		bp_core_remove_subnav_item( $bp->forums->slug );
    	}
    }
    add_action( 'wp', 'my_remove_replies_subnav', 2 );

    Thanks


    eigodeasobo
    Participant

    @eigodeasobo

    Hi,
    Sorry for replying late.

    'bbp-replies'!?
    That makes sense.

    Thanks.

    I like your new profile photo:)


    Prashant Singh
    Participant

    @prashantvatsh

    I like your new profile photo:)

    Thanks 🙂

    You have noticed both ‘bbp-replies’ and my profile pic, thanks again 🙂

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