I’m using bp-default which is a bundled theme.(I copied bp-default from wp-content/plugins/buddypress/bp-themes/ to wp-content/themes)
Actually I changed theme Twenty Seventeen, number fields are displayed, so should not I use bp-default?
I think in the first instance you’d probably need to ask the developers of ACEide to build in a mechanism to allow other roles to have access to the editor, there’s usually some way built in to change that.
You’d then thinking about how to integrate it into BuddyPress, such as enabling that post type to make a new activity entry on publication. You’d probably need to write a plugin for that as there’s quite a few features you might want to activate, such as notifications.
I am tinkering with some tricks shown here: https://usersinsights.com/buddypress-custom-profile/.
It has been mostly successful and straight forward more or less. The examples in the link adds customized content to the user’s HEADER section however (where Avatar & last-active time is shown) using:
add_action( ‘bp_profile_header_meta’, ‘my_function’ );
How might I add actions to the main body of a profile page (i.e. in the Base profile section [before and after])? I’ve tried substituting ‘bp_profile_header_meta’ with the other hooks shown in the tutorial i.e.:
add_action( ‘bp_before_profile_content’, ‘my_function’ );
add_action( ‘bp_before_member_activity_content’, ‘my_function’ );
but none of them displays the content within the main body of the profile. Please help.
Thanks in advance.
I added a Number type field and a Phone Number type field on profile fields.
The number type fields are not displayed on a profile edit page, but I can input values on admin pages and see it on a profile view page.
How do i fix this problem? Thank You.


I tried 2 environments.
1. localhost
nginx
PHP 7.2.9
WordPress version 5.0.4
buddy press Version 4.2.0
plugins Classic Editor & BuddyPress only
theme bp-default
2. AWS (Amazon Linux)
Bitnami WordPress 4.9.10 (multi sites)
buddy press Version 4.2.0
PHP 7.0.31
theme bp-default
Hi all,
I’m a newbie for wordpress and this awesome plugin, BuddyPress, so please forgive me if that was already done, i didn’t see anything.
I want to setup a community, wit BuddyPress, where people (mostly for developers) should be able to cut&past part of code easily keeping format.
In a previous experience, not using any CMS, the folks i worked for were using Ace Editor:
https://ace.c9.io/
Which is quite good and i would like to know if i can setup it to let embed the code even for user on my new community.
Any help would be greatly appreciated.
NOTE: i see AceIDE is a plugin for WordPress, but it only permit admins to setup the WP itself, not to turn it on the community.
Thank you.
Regards,
Michele
I’m using the latest version of BuddyPress, version 4.2. What plugin are you referring to when you say it’s version 1.3.3?
Hi there,
I can confirm this is an issue, could you raise a bug report on Trac?
https://buddypress.trac.wordpress.org/
Thanks
/*
* Paste in your theme functions.php or in bp-custom.php.
* Load the site in a browser
* Then REMOVE this function from your theme functions.php or bp-custom.php.
*/
function buddypress_add_last_activity() {
$members = get_users( 'fields=ID' );
// $members = get_users( 'fields=ID&role=subscriber' );
foreach ( $members as $user_id ) {
bp_update_user_last_activity( $user_id, bp_core_current_time() );
}
}
add_action('bp_init', 'buddypress_add_last_activity' );
Hi Venutius,
hmmm … meanwhile I tried to figure the file you suggested; Under the theme files, I foud the “function.php” – file (screenshot: https://ibb.co/YDw7LN5). But there’s no buddypress menu, where I could add this code snipped. Maybe I’m totally wrong here! Please, could you be more precise, so I could follow your advise?
thank you very much in advance and best Regards!
Hi Venutius, thank you for your reply! I meant the file, inside the buddypress files directory (screenshot: https://ibb.co/bgFfSgr).
About you’re saying:
Also I’d load it in the action hook ‘bp_setup_nav’, not ‘wp’.
Did you mean changing the line
add_action( 'wp', 'groups_subnav_hook', 2 );
to
add_action( 'bp', 'groups_subnav_hook', 2 ); ?
Thanx very much for help (y) !
I am new to Buddypress and there is a question. I have created a wordpress site and wanted this to became a membership/club site. I use a theme named Astra and tried to style special Theme styles like header with background image etc. But if i tried it on Buddypress pages (Aktivity for eg) i failed. What i am doing wrong
If you check out my website you should see I’ve written a lot about the basics of BuddyPress, you should check it out, it should answer a lot of questions.
When you enable the BuddyPress Groups component you will be able to set up a Groups page, when this is viewed it will automatically show a Create Group link.
If you install bbPress you can enable group forums, that way your users get the option of addinga forum to their group.
I’d first try switching your BuddyPress theme to BP Legacy in Settings>>BuddyPress>>Options. and see if the menu appears
Ah ok, my hunch was wrong, hope you found it an interesting diversion. Have you tried deactivation all plugins apart from BuddyPress to see if there might be a conflict causing this?
Yes users receive and use the activation link, I can see that they, created and activated the account but then they cannot connect.
And now I have a new problem, the register page isn’t showing on the menu where I added it.
I could add a “normal” register link but it will still be shown after loggin, if would prefer to make the buddypress one work.
Thanks for your help !
Hello everyone !
First of all, thank you for this beautiful extension! We have been using Buddypress on our platform for some time now and we would have some questions (WP v5.1.1 & BP v4.2.0 with “Heritage”).
- Through an Snippet, how can we view a particular Member only? We would need to recover his Avatar + his Nickname.
- What PHP can we use to display a dynamic link to a Player’s Profile? Let me explain: We use Event Listings on our Site and we would need to display the Member’s Nickname + a link to his Profile automatically.
Thank you in advance for your answers !
Peufa, for Jeu COOP (https://www.jeu-coop.fr).
Yep BuddyPress uses the WordPress user database, so creating a BuddyPress user automatically creates a WordPress user.
Are the users receiving the activation link and are they trying to login after activating their accounts?
Hi there,
To centre the title you can use the following css slector:
#sitewide-notice strong {
text-align: center;
}
However currently it’s not possible to separate the two paragraphs. This is due to the text going through the wp_filter_kses() function which is removing the <p> tags from the text thus turning two paragraghs into a single paragraph.
You could ask for an enhancement in Trac, to change this to an alternative function bp_messages_filter_kses() this would allow you to add a filter to allow <p> in the sitewide notice content. If you raise the ticket I’ll add this information as a suggestion to the devs.
I forgot one, you also need to remove the option from the Admin>>My Profile page, if you allow admin access for users:
add_action( 'bp_members_admin_xprofile_metabox', 'bpex_remove_user_profile_metabox', 20 );
function bpex_remove_user_profile_metabox() {
if ( ! is_admin() ) {
return;
}
$user = wp_get_current_user();
$user_roles_array = $user->roles ? $user->roles : array();
foreach ( $user_roles_array as $key => $role ) {
if ( $role == 'subscriber' ) {
remove_meta_box(
'bp_xprofile_user_admin_avatar',
buddypress()->members->admin->user_page,
'side'
);
}
}
}
This one is not that straight-forward there is a filter you can use as follows:
function bpex_role_disable_avatar_uploads( $default ) {
$user = wp_get_current_user();
$user_roles_array = $user->roles ? $user->roles : array();
foreach ( $user_roles_array as $key => $role ) {
if ( $role == 'subscriber' ) {
$default = true;
}
}
return $default;
}
add_filter( 'bp_disable_avatar_uploads', 'bpex_role_disable_avatar_uploads' );
However this causes BuddyPress to simply show the user that they can upload their profile image via gravatar, and I’m afraid you can’t switch this off.
So the alternative is to remove the Change Photo tab and admin-bar menu item:
add_action( 'bp_setup_nav', 'bpex_remove_change_profile_photo_tab', 50 );
add_action( 'bp_setup_admin_bar', 'bpex_admin_bar_remove_change_profile_photo', 50 );
function bpex_remove_change_profile_photo_tab() {
if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() && bp_displayed_user_id() != wp_get_current_user() ) {
return;
}
$user = wp_get_current_user();
$user_roles_array = $user->roles ? $user->roles : array();
foreach ( $user_roles_array as $key => $role ) {
if ( $role == 'subscriber' ) {
bp_core_remove_subnav_item( 'profile', 'change-avatar' );
}
}
}
function bpex_admin_bar_remove_change_profile_photo() {
global $wp_admin_bar, $bp;
if ( ! bp_use_wp_admin_bar() || defined( 'DOING_AJAX' ) ) {
return false;
}
$user_id = get_current_user_id();
if ( ! $user_id || $user_id == 0 || ! is_numeric( $user_id ) ) {
return;
}
$user = wp_get_current_user();
$user_roles_array = $user->roles ? $user->roles : array();
foreach ( $user_roles_array as $key => $role ) {
if ( $role == 'subscriber' ) {
$wp_admin_bar->remove_menu( 'my-account-xprofile-change-avatar', 'my-account-xprrofile' );
}
}
}
You’d need to put this in your child themes functions.php or a bp-custom.php file in the plugins directory.
I’ve added Categories to Activities per this thread: https://buddypress.org/support/topic/add-category-field-to-buddypress-activity-4/
I see these categories turning up in the wp_bp_activity_meta table. I’m just not sure how to now filter my activity loop by these categories now.
Ultimately, I want a selection in the users profile to dictate what’s in their feed (e.g. only show me activity from my friends OR about this category) I’ve already got the activity feed filter by friends using: https://buddydev.com/support/forums/topic/friends-only-activity-stream/#post-1345
But right now I’m just looking for a steer on how to filter the activity loop. I’ll hopefully figure out how to make it a user option from there!
Halo,
Can i decide who can or cannot change the profile picture based on user role?
Is there any plugins for this or code change?
Thank you in advance.
note: i use wordpress Version 5.1.1 and buddypress Version 4.2.0
To add the feature where people can post updates to the user would involve adding the activity What’s New form to the the users all activity page. It’s an odd quirk of BuddyPress that the standard profile based activity update form only displays when the viewing user is the profile owner.