I am using the buddyPress BP Profile Search plugging to filter members in my website,I create a form to filter members by Categories,But I had an issue when i go to page number to in the result of searching,I tried to update and making some modification in the plugging itself but i still facing this problem .
the result of search at the first time it come with the right result and number of pages is correcte, but when we click on the second page or any other pages i lost the filter
I personally find the up/down animation of the Read More animation to be distracting and slow.
I found similar discussions without answers:
Modifying the activity “read more” links animation in global.js
Modifying the “read more” activity link behavior.
Is it possible to remove this animation without modifying the core .js files?
Thank you!
Hello,
Have integrated BuddyPress with WordPress and I want my subscribers to be able to access the Settings sections and be able to change their passwords and email addresses.
When they try changing their passwords..They get logout the error message “You must log in to access the page you requested”
I also tried and deactivated all the plugins and changed the theme but am still getting the same issue.
See my link below
https://hplportal.com/wp-login.php?redirect_to=https%3A%2F%2Fhplportal.com%2Fmembers%2Fjules%2Fsettings%2Fgeneral%2F&bp-auth=1&action=bpnoaccess
To get members of a specific group, use groups_get_group_members.
Found in buddypress\bp-groups\bp-groups-functions.php
Review the function to get all the parameters.
Example:
$args = array( 'group_id' => 99 );
$group_members = groups_get_group_members( $args );
var_dump( $group_members );
Hi,
I am using elementor but after disconnecting the group pages from BuddyPress Pages, I import a template and save the page. Then I again connect the page to BuddyPress Groups. However, after the connection, the formatting is all lost and the page appears plain white. How can I avoid this? I am asking because I want to give a background colour to the activity, group and members pages. If I use a templated after importing it. does Buddypress suppress all the formatting in the template?
Thanks
I already have the shortcode created, but when I put the shortcode in activity feed he doesn’t work.
I want to do this: https://buddypress.org/support/topic/enable-shortcodes-in-activity-screen-of-buddypress/ but in the new version of buddypress.
Hi,
Can someone please tell me how to get the ‘Log in’ on my main menu on my header? I see ‘Register’, ‘Groups’, Activity’ but not ‘Log in’.
The ‘log in’ does appear on the black top bar along with ‘register’ but I want to remove the top bar. I
have disabled the top bar in my theme but it continues to appear, so I think it is the BuddyPress top bar. How can I remove it?
Thanks
So I’m working on a little project, trying to grasp the workings of WordPress. I’ve created a website, currently still on localhost, and installed buddypress. My problem is that I can’t seem to send buddypress emails like the activation one, even though regular WordPress emails like the reset password email are sent correctly. I currently have WP Mail SMTP setup with a personal Gmail account of mine so I can easily see which emails are sent or not and even though WordPress says the activation emails are sent as the counter in the user tab displays, in my email no mails were ever sent. What can I do to troubleshoot the situation?
Edit: buddypress version is 9.0.0
That solution was for the old templates – 6 years ago!
You could use this hook: do_action( 'bp_activity_entry_content' );
Found in: buddypress\bp-templates\bp-nouveau\includes\activity\template-tags.php
Again – no need to use a shortcode.
I don’t have another option to enable the shortcodes in activity posts ?
I found this:
Enable Shortcodes in Activity Screen of Buddypress
but doesn’t work
Did you assign the components to those pages?
Configure BuddyPress
That is not how shortcodes work.
You need to put it in the template:
buddypress\bp-templates\bp-nouveau\buddypress\activity\entry.php
Overload that template in your child theme and then make your change.
Since you are in the template, just make a call to a custom function – no need for a shortcode.
Can i have review discussion before public with buddypress?
Hello,
I’m working on a mobile app to interface with our BuddyPress 9.0.0 website via the BP API. Our website has some xprofile group fields of the “checkbox” type, each group with a set of “options” which the user can set to be true or false. For example, there is a group called “Pets” under which the user can select one or more of the specified check boxes such as “Dog”, “Cat”, “Cow”, etc.
I am having trouble trying to update this type of “checkbox” field using Postman. The update works fine for fields of type “textbox” and “selectbox”, but doesn’t work for the “checkbox” type.
The endpoint is “/buddypress/v1/xprofile/<field_id>/data/<user_id>” (POST operation, here the field_id I am using is the id of the parent group field)
The JSON in the body of my call is
{ “context” : “edit”, “value”: [“Dog”, “Cat”]}
As mentioned before, if I try the same post call with a field of type “textbox” or “selectbox”, it works fine, but if I post to a “checkbox” field it just clears the existing data and does not set it to the new values.
Any ideas what I may be doing wrong here?
I think I found the issue. I believe my theme is causing the problem. I’m using Astra 3.6.5. When I entered troubleshooting and used Twenty Twenty with bbPress and BuddyPress, the group forum topics are opening as expected. I also discovered that the WP Admin Dashboard>Appearance>Customize is broken, too. There is some compatibility issue with the latest BuddyPress with the Astra theme.
I’ve opened a ticket with Astra, but wanted to put my discovery here in case anyone else has a similar issue.
Thanks!
I’ve been testing this and found out that the code as is done in my previous post will break the members search feature from 3rd party plugins. So I modified this to use the “exclude” argument instead of the “include”.
Since doing this is going to be a heavy call on the server, I’ve decided to store my exclusion list in the DB as an option. I’m sure this could be done with transients so feel free to improve changing the storage of the array in a transient.
Note: shanebp mentioned this does not apply to ajax calls but it’s a filter to the members query so won’t it run whenever a call to the members is done no matter if it’s ajax or not if we exclude that piece of code?
Revised code follows. I tested this and it works fine for me.
/**
* Only list active MemberPress members in the members directory.
* sources:
* https://buddydev.com/hiding-users-on-buddypress-based-site
* https://buddypress.org/support/topic/member-loop-only-memberpress-members/
* @param array $args args.
*
* @return array
*/
function tmp_only_show_members_in_directory( $args ) {
// do not exclude in admin.
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
return $args;
}
$args['exclude'] = tmp_get_users_to_exclude_from_directory();
return $args;
}
add_filter( 'bp_after_has_members_parse_args', 'tmp_only_show_members_in_directory' );
/**
* Returns an array of IDs to exclude, runs the queries if empty
* @return false|mixed|void
*/
function tmp_get_users_to_exclude_from_directory() {
$ids_to_exclude = get_option('tmp_update_members_to_exclude_from_directory');
if (empty($ids_to_exclude) || !is_array($ids_to_exclude) || count($ids_to_exclude) < 1) {
tmp_update_members_to_exclude_from_directory();
}
return get_option('tmp_update_members_to_exclude_from_directory');
}
// Scheduled Action Hook
function tmp_update_members_to_exclude_from_directory() {
global $wpdb;
$member_ids = $wpdb->get_col("SELECT DISTINCT user_id FROM ".$wpdb->prefix."mepr_transactions WHERE status IN('confirmed','complete') AND (expires_at >= NOW() OR expires_at = '0000-00-00 00:00:00')");
$user_ids = get_users(['fields'=>'ID']);
$user_ids_to_exclude = array_diff($user_ids, $member_ids);
return update_option('tmp_update_members_to_exclude_from_directory',$user_ids_to_exclude);
}
add_action( 'hook_name', 'tmp_update_members_to_exclude_from_directory' );
// Schedule Cron Job Event
function tmp_update_members_to_exclude_from_directory_job() {
if ( ! wp_next_scheduled( 'tmp_update_members_to_exclude_from_directory' ) ) {
wp_schedule_event( current_time( 'timestamp' ), 'twicedaily', 'tmp_update_members_to_exclude_from_directory' );
}
}
add_action( 'wp', 'tmp_update_members_to_exclude_from_directory_job' );
Hi,
Using
function profile_tab_event() {
global $bp;
bp_core_new_nav_item( array(
'name' => 'Events',
'slug' => 'event',
'screen_function' => 'event_screen',
'show_for_displayed_user' => false,
'position' => 70,
'parent_url' => bp_loggedin_user_domain() . '/event/',
'parent_slug' => $bp->profile->slug,
'default_subnav_slug' => 'event'
) );
}
add_action( 'bp_setup_nav', 'profile_tab_event' );
function event_screen() {
// Add title and content here - last is to call the members plugin.php template.
add_action( 'bp_template_title', 'event_title' );
add_action( 'bp_template_content', 'event_content' );
bp_core_load_template( 'buddypress/members/single/plugins' );
}
function event_title() {
echo 'Events';
}
function event_content() {
echo 'Content';
}
I created a new tab for users. But how can this be limited to specific user types? Different user types see different tab and/or different content in the tab?
I suppose it could use this code:
$member_type = bp_get_member_type( bp_displayed_user_id() );
if ( $member_type == 'userA' ) {
Though not sure how to apply it.
Any suggestions would help.
using buddyboss theme
WordPress 5.8
BuddyPress 9.0.0
bbPress 2.6.6
AuthorReady.com (paid member site, so link won’t help much)
I recently installed bbPress and BuddyPress on my existing paid membership website. The forums and groups are part of the membership and not viewable by the public. I created forums and topics for each group; however, when I try to open a topic in the group’s forum, it will display the first topic, regardless of the URL.
For example, if I am on my group’s forum page (authorready.com/groups/action-thriller/forum/) I see two forum topics: Beta Readers and General Discussion. When I select Beta Readers (authorready.com/groups/action-thriller/forum/topic/action-thriller-beta-readers/), it displays as expected. However, when I click the second topic for General Discussion, the URL is correct (authorready.com/groups/action-thriller/forum/topic/action-thriller-general-discussion/), but it displays the Beta Reader information instead.
I deactivated BuddyPress and the bbPress forums work as intended. The issue is isolated to how they display in the BuddyPress groups. Any ideas why this is happening and how I can fix it?
Hi Shane,
Thanks for the quick reply and it actually worked! Thank you 🙂
The sidebar shows for a specific user type now but it shows up in the wrong location. I tried the code in different places but it’s in the middle of the profile now and want it to be on the left side like the normal sidebar for user profile.
The first part of the code is the simplified version you mentioned and the css styling. The rest is the remaining of the loop on that page. I suppose the code should go somewhere in there:
</div><!-- #item-body -->
<?php
$member_type = bp_get_member_type( bp_displayed_user_id() );
if ( $member_type == 'club' ) {?>
<div id="secondary" class="widget-area sm-grid-1-1 no-padding-top" role="complementary">
<div class="bb-sticky-sidebar">
<?php dynamic_sidebar( 'club_sidebar'); ?>
</div>
</div>
<?php
}
?>
<?php
if ( ( !isset($bp_nouveau_appearance['user_nav_display']) || !$bp_nouveau_appearance['user_nav_display'] ) && is_active_sidebar('user_activity') && bp_is_user_activity() ) {
ob_start();
dynamic_sidebar('user_activity' );
$sidebar = ob_get_clean(); // get the contents of the buffer and turn it off.
if ( trim( $sidebar ) ) { ?>
<div id="user-activity" class="widget-area" role="complementary">
<div class="bb-sticky-sidebar">
<?php dynamic_sidebar( 'user_activity' ); ?>
</div>
</div><?php
}
}
if ( ( !isset($bp_nouveau_appearance['user_nav_display']) || !$bp_nouveau_appearance['user_nav_display'] ) && is_active_sidebar( 'profile' ) && !bp_is_user_settings() && !bp_is_user_messages() && !bp_is_user_notifications() && !bp_is_user_profile_edit() && !bp_is_user_change_avatar() && !bp_is_user_change_cover_image() && !bp_is_user_front() && $profile_cover_width == 'full' ) {
ob_start();
dynamic_sidebar('profile' );
$sidebar = ob_get_clean(); // get the contents of the buffer and turn it off.
if ( trim( $sidebar ) ) { ?>
<div id="secondary" class="widget-area sm-grid-1-1 no-padding-top" role="complementary">
<div class="bb-sticky-sidebar">
<?php dynamic_sidebar( 'profile'); ?>
</div>
</div>
<?php
}
}
?>
</div>
</div><!-- // .bp-wrap -->
<?php if ( isset($bp_nouveau_appearance['user_nav_display']) && $bp_nouveau_appearance['user_nav_display'] && is_active_sidebar( 'profile' ) && !bp_is_user_settings() && !bp_is_user_messages() && !bp_is_user_notifications() && !bp_is_user_profile_edit() && !bp_is_user_change_avatar() && !bp_is_user_change_cover_image() && !bp_is_user_front() && $profile_cover_width != 'default' ) { ?>
</div>
<?php
ob_start();
dynamic_sidebar('profile' );
$sidebar = ob_get_clean(); // get the contents of the buffer and turn it off.
if ( trim( $sidebar ) ) {
?>
<div id="secondary" class="widget-area sm-grid-1-1 no-padding-top" role="complementary">
<div class="bb-sticky-sidebar">
<?php dynamic_sidebar( 'profile'); ?>
</div>
</div>
<?php
}
?>
This is a screenshot of where the sidebar is appearing:
Certificates is in the middle. How can it be in the place of cart?
-How can I move the sidebar (Certificates) to where the left sidebar (Cart) is?
-And how can I repeat this process for 3 different user types? 3 custom sidebars for 3 user types.
-I was not sure what “ob_start()” and “bp_nouveau_appearance” were that appear in the beginning of the other sidebar code. How can I add them to the custom sidebar? Are they even necessary?
Appreciate the support and the community around BuddyPress
Hey guys, I saw a post here on how to add a new topic button which is pretty cool.
So it got me to look at form-topic.php and from it created my own simplified “create a new topic page” however it shows a dropdown-box to select which forum the user wants the post to go to but I just want this form just for one forum which I have the id for.
How do I change the drop-down to auto-select the forum I want by default?
Thank you.
Hi, new to this whole BuddyPress thing. Trying to make a social site and I’m having a rough time with it.
I’ve searched and searched, here included, for info on how to change the colors and design of the profile page, but all I ever find is how to add new fields. I don’t want to add new fields, I want to change the colors. Can’t find it anywhere. Please help.
WP/BP versions – current
I found out that the registration page for BuddyPress, when set in the dashboard overtook the page I had customized. To avoid that, I gave it is own page, so that my “normal” login was the customized one.
However, I notice that the Buddypress registration is letting a lot of spam registrations in, since it is not using captcha. Is there a way to disable it completely so I can just keep my own page the way I set it up?
buddypress: 9
theme: Gwangi
main domain: imin.co.il
Core: no core changes
when upload profile photo the preview is displayed wrong
thanks
ori
Please note the above solution won’t work if you have a custom table prefix (i.e. different than “wp_”).
I’ve put together this function using the bp_after_has_members_parse_args filter. Posting it here in case anyone needs it. So far it looks like it works fine.
/**
* Only list active MemberPress members in the members directory.
* sources:
* https://buddydev.com/hiding-users-on-buddypress-based-site
* https://buddypress.org/support/topic/member-loop-only-memberpress-members/
* @param array $args args.
*
* @return array
*/
function tmp_only_show_members_in_directory( $args ) {
// do not exclude in admin.
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
return $args;
}
global $wpdb;
$member_ids = $wpdb->get_col("SELECT DISTINCT user_id FROM ".$wpdb->prefix."mepr_transactions WHERE status IN('confirmed','complete') AND (expires_at >= NOW() OR expires_at = '0000-00-00 00:00:00')");
$args['include'] = $member_ids;
return $args;
}
add_filter( 'bp_after_has_members_parse_args', 'tmp_only_show_members_in_directory' );