Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25386

    Hi Beuza,
    Can you please give this code a shot?

    
    
    /**
     * Remove groups from user profile based on member type.
     */
    function buddydev_remove_group_based_on_member_types() {
    	if ( ! bp_is_user() ) {
    		return;
    	}
    
    	$user_id = bp_displayed_user_id();
    
    	if ( ! bp_has_member_type( $user_id, 'agent' ) ) {
    		bp_core_remove_nav_item( 'groups' );
    	}
    
    }
    
    add_action( 'bp_setup_nav', 'buddydev_remove_group_based_on_member_types', 1001 );
    
    /**
     * Remove groups from adminbar based on member type.
     *
     * @param array $nav nav items.
     *
     * @return array
     */
    function buddydev_filter_show_hide_groups_in_adminbar( $nav ) {
    	if ( ! is_user_logged_in() ) {
    		return $nav;
    	}
    
    	if ( ! bp_has_member_type( bp_loggedin_user_id(), 'agent' ) ) {
    		$nav = array();
    	}
    
    	return $nav;
    }
    
    add_filter( 'bp_groups_admin_nav', 'buddydev_filter_show_hide_groups_in_adminbar' );
    
    

    It works with our Member types pro and most probably will work with the other plugin too.

    Please make sure to use “agent” like shown below in the member type name.
    https://i.imgur.com/JdiZUTa.png

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25386

    Hi Naomi,
    before I assist you with the code I will like to explain these two buttons.

    Comment Button:- Allows you to comment on activity

    Reply Button:- Allows you to comment on comment.

    Do you still want to disable reply button?
    You can use this code.

    
    
    add_filter( 'bp_activity_can_comment_reply', '__return_false' );
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25386

    Hi Laurent,
    Thank you.
    It was a kind gesture by you but not required.

    I am going to install and use the other plugin and check the code. I will get back to you within an hour with the details.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25386

    Hi Alex,
    Thank you for posting.
    Do you want to make the live username checking for login? or is it for registration?
    Technically it is possible to do for any kind of registration form, I just want to make sure you are looking for registration and not for login?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25386
    Brajesh Singh on in reply to: Personalized type of user profile #11847

    Thank you. yes, as soon as I push the plugin on our site I will send you a code for the same.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25386
    Brajesh Singh on in reply to: Activity Feed Posts And Commenting #11840

    Hi Charlie,
    I will have an update for you by Sunday. Sorry for the delays.

  • Keymaster
    (BuddyDev Team)
    Posts: 25386
    Brajesh Singh on in reply to: Improve BuddyPress Limit Group membership Per User #11839

    Hi,
    Thank you.

    1. The discount is for mebreship(only on Buddy Pro)
    2. Sure but we will need a few days to check the Membership 2 plugin before making any qute. It should be doable though.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25386
    Brajesh Singh on in reply to: Some suggestions #11836

    Thank You.
    Sure things.

  • Keymaster
    (BuddyDev Team)
    Posts: 25386
    Brajesh Singh on in reply to: Improve BuddyPress Limit Group membership Per User #11835

    Hi MWale,
    Thank you. I will not suggest getting the complete thing developed if you have budget constraints. The better option is to integrate these features into one of the existing membership plguins.

    You can find affordable developers on upwork.com

    You may hire me/my team too
    https://buddydev.com/hire-us/

    Thank you for asking about black Friday sale. Here you go, you can use BLACKFRIDAY for next 24 hours on our yearly membership to get 30% discount.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25386
    Brajesh Singh on in reply to: Buddypress – Block update notifications? #11834

    Hi Ekiz,
    Instead of publish post, you should add notification on transition_post_status and make sure to change that the status transition is from non published to publish.

    Please see an example here
    https://codex.wordpress.org/Post_Status_Transitions

    Hope that helps.
    Regards
    Brajesh