Hello
I am in the process of following the instructions at https://www.designwall.com/guide/dw-question-answer-plugin/buddypress-integration/ for integration of BuddyPress with DW Question & Answer. As I do not host my own site, there are issues about me editing my functions.php file or even creating a child theme functions.php file. I would like instead to add code using the Additional CSS area in my dashboard. However, when I copy-paste the recommended code
include_once get_template_directory().’/buddypress/bp-custom.php’;
into this area, multiple errors are reported as follows:
Expected LBRACE at line 5, col 14
Unexpected token ‘get-template_directory(‘ at line 5, col. 14.
Unexpected token ‘)’ at line 5, col 37.
Expected INDENT at line 5, col. 39.
I am in turn advised of the following:
There are 4 errors which must be fixed before you can save.
Update anyway, even though it might break your site?
I would be grateful for help in correcting the above line of code. It is not possible to contact the creator of DW Question & Answer directly via their website, as they demand payment of an annual fee in the first instance.
Many thanks!
Here the piece of page on which there is the element with “selected” class (HOME button).

Home button is a standard Buddypress element. I don’t add it for myself.
Removing the selected class from Developer tools, and submitting the search form, it works but don’t use the “ajax mode”: It reloads the page adding search term as GET parameter (?members_search=test&members_search_submit=Cerca) and retrieving the correct results.
I just checked the tempalte’s css file and it says:
/**
* Theme Name: BuddyPress Default
* Theme URI: https://buddypress.org/extend/themes/
* Description: [NOTE: except for security issues, BuddyPress Default is no longer being actively maintained by the BuddyPress team.]
so is there another default theme available?
I have a site running the latest WP and BP 2.9.2 and bbpress 2.5.14 while using the “Buddypress Default” theme. This site is basically only a bbpress forum, no real WP pages being used. It has run for a couple of years but after some of the most recent buddypress updates something seems ot have broken.
Going to WP dashboard => settigns => budypress => settings tab I see: Template pack : Your template pack is out of date and there is only this one choice.
Now the problems I see is that when creating a new thread, the thread is created and shown but only the title, the content posted when creating the thread is hidden. All subsequent replies show just fine.
What should I do? Even if I select a new WP theme, BP still shows outdated template pack. Please advise, all I need is a free WP theme that looks like a forum and supports bbpress/Buddypress
Helloooo buddypress 🙂
Being an avid shopify user..for many years…then recently made the switch to wp, wc and BUDDYP. Never gonna look back! The shear possibillities that these offer and the miriad of extensions…WOW!!! (still gonna be spending an obscene amount of moola on functionalities for my projects, for years to come!
Ps: am not a developer (yet)
Running latest wp and buddyp.
Got myself locked out of my site last night plumbingsuperstote.co.za
Installed buddypress, when done, loged out as admin within buddyp. to test everything…
Now i can not get back in to buddyp or my site backend… I can still get into my wp backend but wp cant access my site…
What to do what to do…
Anyone experienced the same prob? How did you get it sorted?
S.O.S 🙂
@mbfit If by “unsearchable” you mean that they don’t show up in the directory anymore, then the problem is probably that the plugin deleted the ‘last_activity’ activity items for each user. As such, BP doesn’t show them as active users.
Yes you nailed it.
Tech support copied the file members-loop.php from the main theme to the child theme, so it looks like this childtheme/buddypress/members/members-loop.php
and code:
<?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘&per_page=’.sq_option( ‘buddypress_perpage’ ) ) ) : ?>
to:
<?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘&type=alphabetical’ . ‘&per_page=’.sq_option( ‘buddypress_perpage’ ) ) ) : ?>
In case anyone else every happens to run into this..!
I downloaded the latest wordpress and everything was running fine until I tried to download buddypress. I tried downloading the latest version as well and this kept showing up:

and when I try clicking the install button again I get this:

please help, I really want to get buddypress…
@scribit – Thanks for following up. We are getting closer 🙂
Do you have any idea why the home element has the selected class? Does this mean that, when you view the group nav tabs, both Home and Selected have the “current” styling? BuddyPress doesn’t do this out of the box, so I wonder if perhaps there’s something in your theme that’s causing it to happen. Figuring out what’s causing that extra selected class, and disabling it, would probably fix the problem you’ve described.
It is also the case that this JavaScript is quite fragile. I wonder if we could use the body class or something like that as a more reliable way of deterimining which tab we’re looking at. On the other hand, the JS for the new, upcoming template packs (bp-nouveau) is totally different here, so maybe it’s not worth fixing.
Hi @Sander – Thanks for reporting this. It looks like a legitimate bug. I’ve opened a ticket to track it: https://buddypress.trac.wordpress.org/ticket/7631
While we try to figure out a way to make this work better, you can work around the issue by disabling autolink for the field in question. Dashboard > Users > Profile Fields > Edit, and look for the Autolink metabox at the right.
Thanks for the report, @onedevstudios. This sounds like it’s probably a bug. Could you please open a ticket at https://buddypress.trac.wordpress.org with detailed instructions to reproduce? Thanks!
Hi Again,
If I understand https://buddypress.org/support/topic/how-do-i-make-the-comment-button-read-only-in-the-activity-stream/#post-269197 correctly, you mean that users ought to be able to leave a single *top-level* reply to a given activity item, but they should be able to leave as many replies-to-comments as they want. Is that correct?
Correct. That’s exactly what I want. Similar to Facebook.
Thanks,
Naomi
WP 4.9
BP 2.9
I’m having a problem with the output of special characters in the Buddypress profile fields.
Like for example: a company name that uses apostrof ‘Name’ outputs this in the profile field as: https://www.dropbox.com/s/h14ir9rjtnuyc8l/characters.jpg?dl=0
Is there anything that could be done to let the fields accept special characters?
Thank boonebgorges.
First of all buddypress.min.js is correctly loaded in the page and it is not part of the theme but the plugin is installed indipendently.
I’m using version 2.8.2. I load not minified js to debug it. Look at this part of code:
if ( target.attr('type') === 'submit' ) {
css_id = jq('.item-list-tabs li.selected').attr('id').split( '-' );
object = css_id[0];
template = null;
search_terms = target.parent().find( '#' + object + '_search' ).val();
// The Group Members page specifies its own template
if ( event.currentTarget.className === 'groups-members-search' ) {
object = 'group_members';
template = 'groups/single/members';
}
bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, search_terms, 1, jq.cookie('bp-' + object + '-extras'), null, template );
return false;
}
when it create “item-list-tabs li.selected” class to populate css_id array it takes the first one div in DOM with that class, and the corresponding array is [home, groups, li]. So it searches for #home_search to set value of search_terms…but home_search element doesn’t exists on the page!
To correctly search terms it should search for #members_search. What can I do? I don’t want to hardcode some javascript 🙂
I’m unable to test with the proprietary Magnum theme, but with the free version of Optimizer, I’m unable to reproduce the problem. Group member searches are working as expected: https://postimg.org/image/axag5nsjr/
Here’s the relevant part of BP’s JavaScript: https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-templates/bp-legacy/js/buddypress.js?marks=863#L848 The first thing to check is that your theme is actually requiring buddypress.js (or buddypress.min.js) out of the buddypress theme directory; if not, it’s possible you’re running an out-of-date version bundled with a theme or something. Then, you may need to deminimize (or set define( 'SCRIPT_DEBUG', true );) to debug. Then, check to see whether this bit of script is actually able to find the search_terms element. It’s possible that your theme, or some other plugin, is modifying the markup so that the selectors or the element hierarchy has changed.
Hi Naomi – Thanks for the additional details.
I’m afraid I still don’t understand what you mean by “the comment input box” and “the reply area”. Here’s what the activity commenting area looks like on Twenty Sixteen: https://postimg.org/image/yzra0j1h3/ I assume that “the comment input box” is the field at the bottom, just above the ‘post’ and ‘cancel’ buttons. But I’m unsure what in this screenshot represents “the reply area”, and I don’t see any overlap at a glance. If possible, perhaps you could upload a screenshot to a third-party service like https://postimg.org/ and drop the URL here, so that we could better understand the display problem.
The problem I am currently experiencing is that each unique user can make multiple comments on a single post. They should only have the capability to make 1 comment to each post.
And when a user makes a second comment (which they are not allowed to do) that’s when the malfunction occurs and the input box overlaps the reply box.
I’m unclear on what’s happening here. You say that users “are not allowed to” leave a second comment on a post, but I guess what you mean is that you don’t *want* them to be able to do it?
I don’t know of a ready-made plugin that would allow you to limit commenting in the way you’ve described. It would probably be possible to write a small bit of code that would make it work, but I’d need a clearer understanding of what you’re trying to accomplish. If I understand https://buddypress.org/support/topic/how-do-i-make-the-comment-button-read-only-in-the-activity-stream/#post-269197 correctly, you mean that users ought to be able to leave a single *top-level* reply to a given activity item, but they should be able to leave as many replies-to-comments as they want. Is that correct?
Hi Again,
This is a list of all my plugins:
WP Mail SMTP
WP Crontrol
WP All Import Pro
WordPress Mass Email to users
WordPress Importer
W3 Total Cache
tagDiv Social Counter
tagDiv Composer
SiteOrigin Widgets Bundle
Shortcodes Ultimate
rtMedia for WordPress, BuddyPress and bbPress
RSS Importer
Remove Dashboard Access
PushLive – Staging Site to Live Site in One Click
Page Builder by SiteOrigin
Newsletter
Knowledge Base for Documents and FAQs
Invite Anyone, by Boones 🙂
iframe
Hide This
Hide Admin Bar
Easy Affiliate Links
Contact Form 7
Buddypress Shortcodes
Buddypress Friend of a Friend (FOAF)
BuddyPress Follow
BuddyPress Extended Friendship Request
BuddyPress Edit Activity
BuddyPress Block Activity Stream Types
BuddyPress Activity ShortCode
BuddyPress Activity Privacy
BuddyPress Activity Filter
BuddyPress Activity Autoloader
BuddyPress
BP Show Friends
Amazon Auto Links
All In One SEO Pack Pro
Akismet Anti-Spam
Advanced Profiles Plugin 2.0 for BuddyPress
Activity Reactions For Buddypress
Hi Boone,
I deactivated all plugins like you suggested and the problem is still occurring with the comment input box overlaying the the reply area.
It only happens when I have 1 comment or more, ideally once a user makes a comment, in a muti user web environment they can’t make any more comments. Only a new user who hasn’t made a comment can comment on a new post, think facebook type posts.
See example below:
User A = Josh
User B = Nancy
User C = Carol
User A starts a post.
User B make the first comment on User A post , User C replies to User B comment on User A post.
Only 1 unique User can comment on a post one at at time, but they can reply multiple times within a post.
Currently the Activity Stream (BuddyPress) doesn’t have this functionality built in, or is there is plugin that performs this functionality?
The problem I am currently experiencing is that each unique user can make multiple comments on a single post. They should only have the capability to make 1 comment to each post.
And when a user makes a second comment (which they are not allowed to do) that’s when the malfunction occurs and the input box overlaps the reply box.
Thanks so much for your help in this matter.
P.S. I am so thankful for you Boone and the original developers of BuddyPress for being here to support the community.
Naomi
Hi Boone,
BTW: I am using Newspaper – Theme version: 8.1
WP version 4.8.3
Buddypress Version 2.9.2
I always do my code editing in the Newspaper child theme (
Newspaper 7 Child theme: Theme Functions (functions.php)
Thanks,
Naomi
I don’t have access to the proprietary ARMember plugin, so I can’t say anything about that.
Here’s one way to show arbitrary content in a BP user’s profile header:
add_action( 'bp_before_member_header_meta', function() {
$user_id = bp_displayed_user_id();
echo 'Here is the badge for user ' . $user_id;
} );
You’ll need to use the $user_id to fetch the ARMember badge and display it.
See https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-templates/bp-legacy/buddypress/members/single/member-header.php for other hooks you could use instead of bp_before_member_header_meta.
It looks, at a glance, like the LH Private BuddyPress plugin ought to be doing what you’re asking for. https://plugins.trac.wordpress.org/browser/lh-private-buddypress/trunk/lh-private-buddypress.php#L101
If it’s not working, it’s either because of an error in the plugin logic, or because something on your server or WP setup is interfering with the redirect_to parameter.
Can you share the format of the URL at various points of the process? For example, when visiting example.com/groups/my-private-group as a logged-out user, you should be redirected to:
example.com/wp-login.php?redirect_to=/groups/my-private-group
If, after login, you’re being redirected back to wp-login.php, what is the format of the URL then?
What is the URL format of your BP/WP installation? Are you installed at the top level of a domain example.com or in a subdirectory example.com/buddypress/?
Looking more closely at your styles, the problem might be the width of your #item-meta. Remove the margin-top declaration you entered before, and try this instead:
#buddypress div#item-header div#item-meta {
width: 200px;
}
Your next step is to start getting familiar with CSS 😀 https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS
Hi,
the things is, when I type my home url, it takes me to an user profile. It seems a redirection.
So, each time a type the main url I see the user profile
Any suggestion?
Horrible mistake!
@mbfit If by “unsearchable” you mean that they don’t show up in the directory anymore, then the problem is probably that the plugin deleted the ‘last_activity’ activity items for each user. As such, BP doesn’t show them as active users.
If you retained a backup before you ran the delete process, then you should restore the last_activity items from it. If not, you can run a script that will set last_activity for all users that don’t have it set – though note carefully that it won’t really be *accurate*.
function bbg_set_last_activity() {
global $wpdb;
$user_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->users}" );
foreach ( $user_ids as $user_id ) {
if ( bp_get_user_last_activity( $user_id ) ) {
continue;
}
bp_update_user_last_activity( $user_id );
}
}
As to your original question, there is no single UI or command you can run to delete activity items based on date. wp-cli-buddypress would be part of a good solution, but it would take additional scripting to delete based on date range. If you have some familiarity with bash scripting or PHP scripting, I will point you in the right direction, but I don’t want to just give you stuff to copy and paste, because deleting stuff is dangerous 😀
Dear @sbrajesh
I want to make the “whats new button” always visible.
I’ve read your explanation here : https://buddypress.org/support/topic/wheres-the-javascript-that-expands-whats-new-content/#post-233401
but I don’t understand, what you mean about this javascript :
jQuery(‘#whats-new’).off(‘focus’);
jQuery(‘#whats-new’).off(‘blur’);
Would you mind providing me the detail javascript ?
thank you very much