BP functions need to be used in WP & BP context.
For example, they should not be called until BP is loaded and ready – use the ‘bp_ready’ hook.
And use the WP db functions – see $wpdb
If you want to use vanilla php and mysqli, then you’ll need to roll your own join group function.
I need to exclude Author role from my BP members loop. The authors will all go into a different Directory system with different profile template and no BP functionality, just wordpress blogging capabilities.
Does anyone have some code I can pop into the functions.php of my child theme?
thanks!
It sounds like you need @imath’s Rendez Vous plugin.
Rendez Vous
If you haven’t already, create a child theme.
Then copy your buddypress/template folder & subfolders over to your child theme.
Go through each file, search for instances of the word “FRIENDS,” and replace it with “CONNECTIONS.”
If you can’t find all instances of the word “FRIENDS” in these files, check your buddypress.po file and use Poedit to hack it out of there too.
If you haven’t already, create a child theme.
Then copy your buddypress/template folder & subfolders over to your child theme.
Go through each file, search for instances of the word “FRIENDS,” and replace it with “CONNECTIONS.”
Or, you can pay a developer thousands of dollars to make a plugin do it for you 🙂
The problem you’re having is really common, not related to any specific code or plugin, and it affects pretty much all WordPress emails (contact form emails, notices, etc) that are sent from a web server instead of through SMTP. (SMTP is what your email programs use.) You never know when a site will start having this problem, so it can appear random, or it can seem connected to a plugin, etc. (It hardly ever is.)
Over the past few years sending mail from a web server has become more unreliable due to the various improvements in fighting email spam: SPF/DKIM/DMARC etc. Using SMTP is the only reliable way to get emails to arrive at their destination (unless you really have your site’s email configuration dialed in).
I could get into all the technical issues/reasons, I’ll spare you. 🙂
Short answer:
- Use an SMTP plugin.
- Create an email account that is only used for sending emails from your site. (Gmail account is fine.)
- Do a search in the WordPress.org plugin directory for “SMTP”, and pick one of those plugins: Easy WP SMTP for example.
Once you get those setup, you should be good to go.
Hey @friendlygooners
You can go to Tools > BuddyPress in the WordPress admin area and then select Reinstall emails under Repair tools.
Is your user name a reference to Arsenal? I’m a fan 🙂
My wordpress dashboard has messed up simply from DEACTIVATING this plugin. Has this happened to anyone else, and if so, what is the rec’m fix. Thanks.
2 options I see:
1) Use hooks on the register.php page like do_action( ‘bp_after_registration_submit_buttons’ ) add_action('bp_after_registration_submit_buttons','your_function');
function your_function(){
echo do_shortcode( '' );
}
2) Modify register page –> copy wp-content/plugins/buddypress/bp-templates/bp-legacy/members/register.php to wp-content/themes/your-child-theme/buddypress/members/register.php and modify in your-child-theme
do_shortcode()
Hi @bttmrc,
You can add the profile avatar in wordpress menu by simply filtering the wp_nav_menu_items function. A nice article is here. Add a custom menu item. You should know a little bit of coding to achieve it.
Final analysis. It turns out that the previous developer’s method for loading certain plugin related pages/posts was done very much NOT “the wordpress way”. This caused bad oembed URLs to be created, so when the oembed data was returned it was corrupted. I was able to resolve all the issues.
This thread can be closed.
host via a server other than WordPress
Are you referring to wordpress dot com ?
Both WP and BP are free and can be hosted on any server.
You don’t need the ‘pro’ membership plugin.
I’m trying to set up a membership site and may go with WooCommerce Membership. But I have a hard time finding a way to solve a problem.
When a member’s membership (via WooCommerce Membership) is cancelled, his Buddypress WordPress user account is still active, which means he can still log in and freely contact other members. i need to find a way to restrict these cancelled members from accessing BP entirely, or at least from Private Message so they can’t contact other members.
So far the closest one i found is this thread
https://buddypress.org/support/topic/hiderestrict-access-to-private-messaging/#post-170393
According to the note, USER_TO_DISALLOW would be my cancelled WooCommerce users. But I wouldn’t know which member would cancel (or their membership level) upfront so this codes don’t seem to work for my site. Besides, it’s 4+ years old and I’m not sure if it’s still relevant.
The other one is
https://buddypress.org/support/topic/restrict-private-messages/
The moderator said there’s a hook available in BuddyPress called messages_message_before_save which can be used to do things before a message is sent. But I don’t know how to write a function to customize it for my need.
Can anyone help? If you happen to know any other membership plugins that can achieve this, I’d really appreciate if you can let me know.
Thank you.
Update: The meta_value saved in wp_bp_messages_meta for meta_key _oembed-***** has the wrong URL saved in there so the problem is occurring before the data is saved. The fact that this same problem happened on my site as well as in this forum is interesting and leads me to believe the problem is somewhere in wordpress or buddypress core files.
@mastershas Profile setting are set to allow individuals to upload profile pic, but still not working. Please click the link below. I use buddypress version 2.9.1
https://friendsthroughgrief.com/members/admin/profile/
I change the theme and still is not working. I have added a code to take off the WP dashboard completely for all users except admin. I have seen screenshots of people having the ability with buddypress to upload a photo directly from their profile? My user profiles do not give me that option?
I have downloaded the following plugins in hope that it will help, but nothing has.
Custom User Profile Photo Version 0.5.3 | By VincentListrani
rtMedia for WordPress, BuddyPress and bbPress Version 4.4.3 | By rtCamp |
Transcoder Version 1.1.2 | By rtCamp
@ftg17 Did you check the Profile Settings Option? If not Login to WordPress dashboard using admin account and navigate to Setting >> Buddypress >> Options >> Profile Settings . Mark tick on allow user to upload profile photo. If you did this kindly change to the WordPress default theme and check if now you can update your profile pic.
@whiteeagle1985 The author links that are shown in the post comes from the the function which is defined in the wordpress theme. Every theme has a redefine function to print the author link. The solution can be creating a child theme and redefine the function according to your need. I am not sure which theme you are using.
@coach-afrane
Functions.php
// Limit the Access To WordPress Dashboard. Only Admin
add_action( 'init', 'blockusers_init' );
function blockusers_init() {
if ( is_admin() && !current_user_can( 'administrator' ) && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}
// Limit the Access To WordPress Dashboard. Only Admin and Editor
add_action( 'init', 'blockusers_init' );
function blockusers_init() {
if ( is_admin() && !current_user_can( 'administrator' ) && !current_user_can( 'editor' ) && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}
// BP Redirect To Profile
function redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ) {
if ( ! $user || is_wp_error( $user ) ) {
return $redirect_to_calculated;
}
//If the redirect is not specified, assume it to be dashboard
if ( empty( $redirect_to_calculated ) ) {
$redirect_to_calculated = admin_url();
}
// if the user is not site admin, redirect to his/her profile
if ( ! is_super_admin( $user->ID ) ) {
return bp_core_get_user_domain( $user->ID );
} else {
//if site admin or not logged in, do not do anything much
return $redirect_to_calculated;
}
}
add_filter( 'login_redirect', 'redirect_to_profile', 100, 3 );
// Exclude Admins from Directories and BP Widgets
add_filter( 'bp_after_has_members_parse_args', 'buddydev_exclude_users' );
function buddydev_exclude_users( $args ) {
//do not exclude in admin
if( is_admin() && ! defined( 'DOING_AJAX' ) ) {
return $args;
}
$excluded = isset( $args['exclude'] )? $args['exclude'] : array();
if( !is_array( $excluded ) ) {
$excluded = explode(',', $excluded );
}
$user_ids = array( 1 ); //user ids
$excluded = array_merge( $excluded, $user_ids );
$args['exclude'] = $excluded;
return $args;
}
You can’t do this by default on the front end in BuddyPress. You can of course do this in the WordPress admin area as an administrator.
Note some steps could be missing here but hope this helps with the general direction 🙂
1. Look for “Users” in left sidebar of WordPress wp-admin area
2. Click “Profile Fields” and there should be a box which you might have named “Terms of Use” – NOTE: if you changed the “Name (Primary) (Required)” to your terms of use field, you should change this back as it syncs with the person’s name
3. Click the blue button “Add New Field” and name it “By registering to ThoseCrazyVegans.net, you agree to the <a href="/terms-of-use/">Terms of Use</a>” (the title accepts HTML at least for now)
4. Then, choose “Checkboxes” for the “Type” below it and type “Yes, I agree to the terms of use” and don’t check Default Value
5. You can also choose “requirement” as required
6. Choose “enforce field visibility”
7. Then click update
I use a different method for registering but hope this helps.
(Sorry having difficulties posting to the forum. Apologies for duplicate replies… Wish there was a way to delete)
I should also add that wordpress is configured for multisite.
UPDATE: found possible solution (?) by going into profile fields section in both dashboards and clicking “edit” and “update” for the required name section. This then appears to have reset things. Now the name updates in both Extended Profile tab and the WordPress default Profile tab when making an edit in the member profile page.​
FYI: I have found several times now that there are strange quirks but I’m sure it is 99% user error (mine) but not everything is straightforward such as this above. To find this method took quite some time trying every standard option and the last was clicking every option over again…