BuddyDev

Limit BuddyPress User and Group Avatar File size

You all know that you can limit the dimension of BuddyPress avatars using the constatnts as exlained here. It is also possible to limit the file size(allowed upload size) for the BuddyPress Avatar. Here is the code that you can put in your bp-custom.php /** * Limit BuddyPress Avatar file size. * * @param int …

Redirect WordPress Author Archive to BuddyPress Profile

Need to redirect from users's WordPress post archive page to their BuddyPress profile? It's easy. You can put the following code into bp-custom.php or in your theme's functions.php /** * Redirect Author archive to user profile. */ function buddydev_redirect_author_archive_to_bp_profile() { if ( is_author() ) { $redirect_url = bp_core_get_user_domain( get_queried_object_id() ); // Update it if you …

Make BuddyPress Pages Members Only

Do you want to make the BuddyPress section of your site member only? It's pretty easy. All we need to do is check if a user is not logged in and they are in BuddyPress section and the current page is not Register or activation page, redirect them to login. Here is the code. /** …

Reordering BuddyPress User Profile tabs

BuddyPress 2.6.0 introduced simpler ways to organize nav items. If you are looking for ways to reorder, It is very simple. Before we dive into code, some basics first. BuddyPress uses numeric position as a way to sort the nav items. The nav items are ordered in ascending order(lower values come first). We can use …

Moderate BuddyPress user profile photo uploads with BuddyPress Avatar Moderator

Do you want to moderate the user profile photo uploads on your BuddyPress Site? If yes, you can use the BuddyPress Avatar Moderator plugin to moderate user profile photos and group display photos for BuddyPress. Features:- BuddyPress User profile photo moderation/BuddyPress User avatar moderation. BuddyPress group display photo moderation(BuddyPress Group avatar moderation) You can either …

Set default filter for BuddyPress Activity

If you need to change the default activity filter from Everything to something else, you can do that easily. Here is an example where I am setting the BuddyPress default activity filter to activity updates. /** * Set Default BuddyPress Activity filter. */ function buddydev_set_default_activity_filter() { // If the filter is already set, do not …

Better group type directory title for BuddyPress

A few days ago, we discussed about having better member type directory title. Today, let us see the same for the group types directory title. In this post, we will see how to improve the directory title for the group types directory:- Problem:- By default, BuddyPress does not update the  directory title to reflect current …

Better member type directory title for BuddyPress

Are you using BuddyPress member types on your site? If yes, you might have noticed the issue with member type directory title. In our forum, one of our members asked about it. Since I thought It may benefit more people, here is the code with an example. Screenshot:- Member type directory title default Note the …