BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Follow Followers Plugin #30524

    Hello Daniel,

    Thank you for posting. Try the following plugin

    https://github.com/r-a-y/buddypress-followers

    Let me know if it works for you or not

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Mark,

    Sorry for the inconvenience. I have tested this with Profile search and it is working fine. Please check error logs what errors it is throwing.

    Also, remove ‘?>’ from the bottom of your ‘bp-custom.php’ file.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] add extra css on a profile field #30471

    Hello Bouke,

    Than you for posting. If you are looking for adding extra CSS within plugin files is not a good idea because if you update the plugin all your changes will be removed. So, If you want to override the CSS you can put CSS under child theme or addition CSS section in customizer.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Mark,

    Please try the following code in your bp-custom.php file. It will list members with most badges on top.

    
    add_filter( 'bp_has_members', function ( $has_members, $members_template ) {
    
    	if ( ! $has_members || ! function_exists( 'bp_user_badges_get_user_badges' ) ) {
    		return $has_members;
    	}
    
    	if ( ! bp_is_members_directory() ) {
    		return $has_members;
    	}
    
    	usort( $members_template->members, function ( $first, $second ) use ( $members_template ) {
    
    		if ( count( bp_user_badges_get_user_badges( $second->ID ) ) >= count( bp_user_badges_get_user_badges( $first->ID ) ) ) {
    			return 1;
    		}
    
    		return -1;
    	} );
    
    	return $has_members;
    }, 10, 2 );
    
    

    Let me know if it works or not.

    Regards
    RAvi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Muhammad,

    Thank you for posting. It can be enabled from settings. Go to Settings > Miscellaneous under this tab.

    Look for “Delegate moderation capability to user roles?” set it to yes. Then from “Moderation Manager Roles” select the roles you want to delegate.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] How to show new post link at blog page? #30441

    Hello Vikas,

    Thank you for posting. Are you looking a way to add a link as subtab under Blogs menu?. Please let me know

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Fill all fields message is not getting displayed #30432

    Hello Sucheta,

    Thank you for the details. Please let me know are you getting default notices like “Profile updated” correctly or not. If not, It seems your theme not firing action name “template_notices” that causing the issue.

    Regards
    Ravi

    • This reply was modified 5 years, 2 months ago by Ravi.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Fill all fields message is not getting displayed #30426

    Hello Sucheta,

    Sorry for the inconvenience. I am not able to understand please let me know what sort of issue you are facing and which environment you are working with i.e. Is it BuddyBoss Plateform or BuddyPress and which theme you are using.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello,

    Sorry for the inconvenience. I forgot to check post_type before modify query. check the following code and let me know if it works or not.

    
    /**
     * Modify query
     *
     * @param WP_Query $query Query object.
     */
    function buddydev_filter_posts_by_cat( $query  ) {
    
    	// Return if not on user screen or current component is not buddyblog.
    	if ( ! bp_is_user() || ! bp_is_current_component( 'buddyblog' ) ) {
    		return;
    	}
    
    // Replace book with your post_type.
    	if ( BUDDYBLOG_ARCHIVE_SLUG !== bp_current_action() || 'book' != $query->get( 'post_type' ) ) {
    		return;
    	}
    
    	$taxquery = array(
    		array(
    			'taxonomy' => 'genre', // Replace this by user custom taxonomy.
    			'field' => 'id',
    			'terms' => array( 32 ), // Replace by your's term_ids to want to show
    			'operator'=> 'IN'
    		)
    	);
    
    	$query->set( 'tax_query', $taxquery );
    }
    add_action( 'pre_get_posts', 'buddydev_filter_posts_by_cat' );
    

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello,

    Thank you for acknowledgement. I am glad that I could help.

    Regards
    Ravi