Hi all,
Experienced in web design but new to WordPress. Working on a theme which relies on buddypress.
I would like to create a C.V. type area on the user’s profile. One section of this area is a list of qualifications. Currently, users can list their qualifications in a textarea.
Instead, I would like to allow users to fill in three fields in that section. So they have ‘qualification name’, ‘result’ and ‘link’. I would also like to allow users the option of uploading an image of their qualification.
I can’t work out where to begin. I downloaded the BuddyPress Custom XProfile Fields plugin, but I can see that this only allows single-field entries.
I have also found this guide: https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/
But, again, it only shows how to display a single field.
So here there are two problems. The secondary one is that users must be able to create new instances of this qualifications fieldset dynamically, though I expect that the solution to this will become apparent when I’ve solved the main problem.
I need to know how to combine fields, so that when a user enters qualification name, grade and link, it is all stored together, or somehow related in the database, so that a single reference can be used to display each field relating to that particular qualification.
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
BuddyPress forces Title Meta Description by Default.
“Profile Name & Site Name”
Is there a method to disable this so SEO plugins can work and fire customised Title Metas?
So, I’ve had a few of my users complaining today that when they try to change their passwords, their accounts just break. neither the old nor the new work.
I went and made a new test account and tried this out to the same results. After disabling all plugins it works fine. Enable JUST BuddyPress and it’s back to breaking accounts.
Manually making a new password from the admin side fixes it and enables login again but once changed, breaks again.
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.
Hi everyone, I already try some solutions like
add_filter( ‘bp_nouveau_activity_content’, ‘do_shortcode’,);
or
function test() {
add_filter( ‘bp_nouveau_activity_content’, ‘do_shortcode’, 1 );
}
add_action(‘bp_init’, ‘test’);
But I can’t solve this problem, somebody knows how to enable the shortcodes in activity feed? thnks
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' );