Forum Replies Created
-
In reply to: Solved – Default role for new BP group member
1. you aren’t supposed to do anything with the do_action. I was just showing you that hook exists.
2 & 3 – did you put the function in BOTH functions.php and bp-custom.php ?
If so, I said OR not AND. In both places it will cause a fatal error and show an entry in the log.
Learn how to debug in WP: https://codex.wordpress.org/WP_DEBUGIf not, then I don’t know what the issue is. It works properly on my test install.
In reply to: Creating another layer to Buddypress GroupsFrom the codex:
In reply to: Solved – Default role for new BP group memberUse this hook which is available right after they join.
do_action( 'groups_join_group', $group_id, $user_id );Try this in your theme/functions.php or in bp-custom.php:
function schene_promote_group_member( $group_id, $user_id ) { $group_member = new BP_Groups_Member( $user_id, $group_id ); $group_member->promote( 'admin' ); } add_action( 'groups_join_group', 'schene_promote_group_member', 10, 2 );In reply to: BuddyPress doesn’t support WP-Rocket?Any caching of pages or objects will not work due to the dynamic nature of BP pages.
In reply to: Trouble creating GroupsWhich settings page are you referring to?
You cannot create a group from the BuddyPress settings page.
If you are the site admin, you should see a ‘Create’ button on this page:Not sure if it solves your needs, but have you tried cbox openlab?
In reply to: log in redirect to wordpress login pageYou have a WP issue, not a BP issue.
You will have better results asking here:
https://wordpress.org/support/forums/Or ask whoever coded your website login page.
Which template pack are you using?
Check under Settings > BP > OptionsThen use the files from that pack which you will find in the bp-templates directory.
The bp-default theme is just there for some old legacy installs.BP has Groups which could be used for competition – each group could be a competition that has its own forum.
For Teams you will need to write custom code.
In reply to: Blank BuddyPress Pages…You need to do a clean activation of BP.
You may need to do a fresh install of WP.In reply to: Blank BuddyPress Pages…> … can’t detect any BP entries in WP Options Table.
There should be about 150 entries re BP in that table.
In reply to: Blank BuddyPress Pages…Have you assigned the pages under BP settings?
Refreshed your permalinks after making sure they are set correctly?
Check your error logs and browser inspector console.
Have you read: https://codex.buddypress.org/getting-started/troubleshooting/blank-pages/In reply to: Blank BuddyPress Pages…Deleting the tables was not a good idea.
They won’t be recreated on a new activation of BP because it checks the WP options table.
So you need to search thru the options table and delete anything BP related.
And then reactivate BP.In reply to: Bp profile search – does not shows search resultPlease contact the creator of that plugin with your question.
In reply to: help to change title after registrationFrom above: You can see it in the language file, buddypress\buddypress.pot
Use poEdit free version to create a .mo file with your changes.
In reply to: Undefined function bbp_is_single_user_profile()bbp_is_single_user_profile()is a bbPress function.
Use this:bp_is_member()In reply to: help to change title after registrationThen it is probably something specific to your installation.
Try deactivating loco-translate and see if the issue persists.
Try switching momentarily to a WP theme like 2019 and see if the issue persists.
Are you using any caching? If so clear it or deactivate it.In reply to: help to change title after registrationThe default theme is not used unless you select it as a WP theme – and it is very old and just there for legacy support.
The string you want is here, on Line 3119
buddypress\bp-members\classes\class-bp-registration-theme-compat.php$title = __( 'Activate Your Account', 'buddypress' );As you can see, it is ready for translation.
You can see it in the language file, buddypress\buddypress.pot on Line 2984In reply to: Duplicate Topics and RepliesI cannot duplicate your issue. Try switching to a WP theme such as 2019 and see if the issue persists.
In reply to: Forums Blogs GroupsOnly groups are created in BuddyPress. Blogs are created in WP. Forums are created in bbPress.
The bbPress forums are here.In reply to: Visability of forum textThese are the forums for BuddyPress. The bbPress forums are here.
Thanks for pointing out the missing
$– fixed.
Admins are not controlled by the function. They will always see the button.
You don’t need to check for$allowed_ids.
This change should prevent contributors from seeing the button on subscriber profiles.elseif ( in_array( 'contributor', $user_roles, true ) ) { $displayed_user_id = bp_displayed_user_id(); $displayed_user = get_userdata( $displayed_user_id ); $displayed_user_roles = $displayed_user->roles; if ( in_array( 'subscriber', $displayed_user_roles, true ) ) { $button = ''; } }In reply to: Group name not showing on group home pageI cannot confirm your report after testing in WP themes and a few premium themes.
Which theme are you using?
Try switching to a theme like WP-2019 and see if the name appears.You cannot get roles from just the user id.
Try:function remove_private_message_button( $button ) { $user_id = bp_loggedin_user_id(); $user = get_userdata( $user_id ); $user_roles = $user->roles; $allowed_ids = array( 23, 6, 25 ); if ( !empty( $user_roles ) && is_array( $user_roles ) ) { if ( in_array( 'subscriber', $user_roles, true ) ) { $button = ''; } elseif ( in_array( 'contributor', $user_roles, true ) ) { if ( in_array( $user_id, $allowed_ids, true ) ) { return $button; } } } return $button; } add_filter( 'bp_get_send_message_button', 'remove_private_message_button', 1 , 1 );In reply to: Registration – top paragraphIt depends on which template pack you are using.
For Legacy, it is this template file:
buddypress\bp-templates\bp-legacy\buddypress\members\register.phpOverload that template by copying it to a directory that you create in your child-theme:
buddypress\members\and make your changes.If you are using Nouveau, it is more difficult. This is the file:
buddypress\bp-templates\bp-nouveau\includes\functions.php
It is not a template file, so your choices are:
1. hack the file and redo the hack every time you update BP – not recommended
2. use a language translator
3. write a filter functionfunction kimo_change_nouveau_string( $array ) { $array['request-details']['message'] = "This is your custom message"; return $array; } add_filter( 'bp_nouveau_feedback_messages', 'kimo_change_nouveau_string', 20, 1 );Paste the function in your theme/functions.php or in bp-custom.php
Test to make sure it is working.
Then adjust the message to your liking.