ah, found the function that the ajax call is doing.
this code works on my test site
function remove_sep ($args) {
$args['before'] = ' ' ;
return $args ;
}
add_filter ('bbp_before_get_topic_subscribe_link_parse_args', 'remove_sep') ;
remove_action( 'bbp_ajax_subscription', array( 'BBP_Default', 'ajax_subscription' ) );
add_action ( 'bbp_ajax_subscription', 'new_ajax_subscription');
function new_ajax_subscription() {
// Bail if subscriptions are not active
if ( ! bbp_is_subscriptions_active() ) {
bbp_ajax_response( false, esc_html__( 'Subscriptions are no longer active.', 'bbpress' ), 300 );
}
// Bail if user is not logged in
if ( ! is_user_logged_in() ) {
bbp_ajax_response( false, esc_html__( 'Please login to subscribe.', 'bbpress' ), 301 );
}
// Get user and topic data
$user_id = bbp_get_current_user_id();
$id = ! empty( $_POST['id'] ) ? intval( $_POST['id'] ) : 0;
$type = ! empty( $_POST['type'] ) ? sanitize_key( $_POST['type'] ) : 'post';
// Bail if user cannot add favorites for this user
if ( ! current_user_can( 'edit_user', $user_id ) ) {
bbp_ajax_response( false, esc_html__( 'You do not have permission to do this.', 'bbpress' ), 302 );
}
// Get the object
if ( 'post' === $type ) {
$object = get_post( $id );
}
// Bail if topic cannot be found
if ( empty( $object ) ) {
bbp_ajax_response( false, esc_html__( 'Subscription failed.', 'bbpress' ), 303 );
}
// Bail if user did not take this action
if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toggle-subscription_' . $object->ID ) ) {
bbp_ajax_response( false, esc_html__( 'Are you sure you meant to do that?', 'bbpress' ), 304 );
}
// Take action
$status = bbp_is_user_subscribed( $user_id, $object->ID )
? bbp_remove_user_subscription( $user_id, $object->ID )
: bbp_add_user_subscription( $user_id, $object->ID );
// Bail if action failed
if ( empty( $status ) ) {
bbp_ajax_response( false, esc_html__( 'The request was unsuccessful. Please try again.', 'bbpress' ), 305 );
}
// Put subscription attributes in convenient array
$attrs = array(
'object_id' => $object->ID,
'object_type' => $type,
'user_id' => $user_id
);
// Add separator to topic if favorites is active
if ( ( 'post' === $type ) && ( bbp_get_topic_post_type() === get_post_type( $object ) ) && bbp_is_favorites_active() ) {
$attrs['before'] = ' ';
}
// Action succeeded
bbp_ajax_response( true, bbp_get_user_subscribe_link( $attrs, $user_id, false ), 200 );
}
SO I have an e-commerce site that I’m using Woocommerce for
I also have bbpress installed and eventually want to build a community
So will my customers from woo and users from bbpress all have one single login?
So if they create an account under Woo, it will also log them into bbpress?
Are they able to access their bbpress profile separately from their normal “account profile” and add more social information if they wanted?
Thanks!
Hello, I use bbpress login form shortcode and when I press the login button without filing any data, it keeps redirect me to the normal wp form with errors msgs, is there a way to keep the errors msg in the same form without redirect?
hello, I need to change the css class”bbp-template-notice” of the returned html in the function bbp_template_notices() exist in includes/common/template.php but i dont see any filter in it , how this can be done?
the function:
function bbp_template_notices() {
// Bail if no notices or errors
if ( ! bbp_has_errors() ) {
return;
}
// Define local variable(s)
$errors = $messages = array();
// Get bbPress
$bbp = bbpress();
// Loop through notices
foreach ( $bbp->errors->get_error_codes() as $code ) {
// Get notice severity
$severity = $bbp->errors->get_error_data( $code );
// Loop through notices and separate errors from messages
foreach ( $bbp->errors->get_error_messages( $code ) as $error ) {
if ( 'message' === $severity ) {
$messages[] = $error;
} else {
$errors[] = $error;
}
}
}
// Display errors first...
if ( ! empty( $errors ) ) : ?>
<div class="bbp-template-notice error" role="alert" tabindex="-1">
<ul>
<li><?php echo implode( "</li>\n<li>", $errors ); ?></li>
</ul>
</div>
<?php endif;
// ...and messages last
if ( ! empty( $messages ) ) : ?>
<div class="bbp-template-notice">
<ul>
<li><?php echo implode( "</li>\n<li>", $messages ); ?></li>
</ul>
</div>
<?php endif;
}
The steps are following,
- Step 1: Costumer creates an appointment
- Step 2: wordpres checks if the customer is having an account if not it creates one
- Step 3: When an account is created it gets the wordpress role “Costumer”
- Step 4: the by u provided app gives the costumer the forum role “Costumer”
- Step 5: Website admin checks the appointment and creates an Forum topic what is only visable by costumers role of the forum
- Step 6: Website admin makes the Costumer owner of the topic so only costumer and admin can view it
`
Only step 4 is not woring, the users are still in the bbpress standard role of the forum, they are not promoted to the “Costumers” group
@robin-w or another mod – can you please delete:
https://bbpress.org/forums/topic/template-in-block-themes/#post-232249 (#post-232249)
https://bbpress.org/forums/topic/template-in-block-themes/#post-232250 (#post-232250)
https://bbpress.org/forums/topic/template-in-block-themes/#post-232256 (#post-232256)
They had issues and take up a lot of wasted space.
Seriously done this time! No more changes/revisions! It is what it is!
Posting a much cleaner revision of the code above.
- This one will work with either the BBPress Style Pack plugin template (looks great!) or the default BBPress template (looks horrible!).
- It will optionally include the required ‘template-canvas.php’ only if it’s missing.
- It will also only affect BBPress pages, not the rest of the site.
- It will also only affect FSE Block themes.
- If using default BBPress templates, it includes checks for if on forum root index page and loads extras/archive-forum.php (to prevent double-listing of the forum index), and loads extras/page-front-forums.php for “the rest of bbpress” (to prevent “nothing found” errors)
// function to include the wp-includes/template-canvas.php file if needed
function fse_bbpress_template( $template ) {
if ( is_bbpress() ) {
$template = ABSPATH . WPINC . '/template-canvas.php';
}
return $template;
}
// function to include the bbpress forum template file if needed
function fse_bbp_theme_compat( $template ) {
if ( is_bbpress() ) {
// BBPress Style Pack Plugin Forums Index Template
if ( defined( 'BSP_PLUGIN_DIR' ) ) {
$template = BSP_PLUGIN_DIR . '/templates/bbpress.php';
} else {
// Default BBPress
// if current page is bbpress forum root page, load archive-forum to prevent double-listing of index
if ( isset( get_queried_object()->name ) ) {
if ( get_queried_object()->name == 'forum' ) {
$template = WP_CONTENT_DIR . '/plugins/bbpress/templates/default/extras/archive-forum.php';
}
// else, load page-front-forums or the rest of bbpress is broken with empty pages
} else {
$template = WP_CONTENT_DIR . '/plugins/bbpress/templates/default/extras/page-front-forums.php';
}
}
}
return $template;
}
// main function for handling which theme file needs to be included
if ( ! function_exists( 'fse_bbpress_support' ) ) {
function fse_bbpress_support() {
// get current theme dir
$theme_dir = get_template_directory();
/*
* Detect if FSE theme or traditional.
* FSE Block themes require a theme.json file.
* Use that to check instead of theme name or parent theme name.
* Perhaps a better method is available, but this works for now
*/
if ( file_exists( $theme_dir . '/theme.json' ) ) {
// include wp-includes/template-canvas.php only if needed
if ( !basename( get_page_template() ) == 'template-canvas.php' ) {
add_filter( 'template_include', 'fse_bbpress_template' );
}
// include either the BSP template, or default BBPress template
add_filter ( 'bbp_template_include_theme_compat', 'fse_bbp_theme_compat' );
}
}
}
add_action( 'after_setup_theme', 'fse_bbpress_support' );
One issue with EVERY default BBPress template is that the header/footer/sidebar are trying to be pulled from template files that don’t exist in block themes. They’re being included, but don’t look right. I’m not sure of the best solution for that, other than to use the BBPress Style Pack Plugin which takes care of that and looks great.
So i almost got it working the way i want it, but at this moment the only problem is when a new costumer gets registrated wordpress puts it in the Costumer role of WordPress,
For some reason the plugin is not picking up the “Assign Groups to Roles” i made group 2 “Costumers” and connected them to the WordPress Costumer group. but for some reason its not happening and the user is still in basic role instead of upgraded tot Group 2 ‘costumer” role in bbpress
Hello BBpress people,
Ive searched the forum and google but nog able to find this specific question.
Im having a Computer repair company and im budy building a forum so people can view the status of their repair real time. but i want it to be as private as it can be, so i want to be able to select the user for the topic so only the site admins and the selected user can see/open the topic.
Is there a way to do this?
Kind regards,
Darwin
‘Associated Courses and Groups’ has nothing to do with bbpress.
I’d suspect it is either something in learndash, or something you have called a page in WP where the shiortcode is held, or a name you have given to something.
Hello,
I am using LearnDash in combination with bbpress and the integration addin. Now there appears a sentence “Associated Courses and Groups:” on the forum overview page, which I can’t translate. LearnDash support said it has something to do with the [bbp-forum-index] shortcode output.
Could you help me translate this string?
Best regards
Rene
bbpress will not use it, so I’d say the answer is yes you can delete it.
But I’d suggest you export the table before deleting.
After weeks of trial and error my import from simple press to bbpress is finally done (YEY!) after some hours now.
And now I have this table: wp_bbp_converter_translator containing 900.000 rows(!)
Can I delete this, or does bbpress or wordpress take use of it now or will it do in the future?
no, I need to see what is being downloaded to your browser.
alternately :
it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Health Check & Troubleshooting
Then come back
the only bbpress related settings are the ones I quoted above.
on my test site
dashboard>settings>forums>forum user slugs>topics started
changes the topics list view.
so if I amend this to ‘dicsussions’ then domain.com/discussions/ works.
I’m having the exact same issue with the newest bbpress and wordpress, trying to import from simple:press.
I have used this tool some other time, on older versions, and then in started at least.
Did you ever find out why it doesn’t start, or did you give up like I’m about to do?
buddyboss is a paid plugin that ties to the free open source bbpress and buddypress plugins. As such I can’t help further, suggest you contact their support.
Using the clues in this topic, this is what I have working for ANY FSE Block theme with the wonderful style-pack plugin:
function fse_bbpress_template( $template ) {
$template = ABSPATH . WPINC . '/template-canvas.php';
return $template;
}
function fse_bbp_theme_compat( $template ) {
$template= BSP_PLUGIN_DIR.'/templates/bbpress.php';
return $template;
}
if ( ! function_exists( 'fse_bbpress_support' ) ) {
function fse_bbpress_support() {
// gt current theme dir
$theme_dir = get_template_directory();
// Detect if FSE theme or traditional.
// FSE Block themes require a theme.json file.
// Use that to check instead of theme name or parent theme name.
// Perhaps a better method is available, but this works for now.
$fse_theme = false;
if ( file_exists( $theme_dir.'/theme.json' ) ) { $fse_theme = true; }
if ( !$fse_theme ) { return; }
// disabled because it doesn't seem to be needed, regardless of style pack
// $bsp_style_settings_theme_support['twentytwentytwo_activate'] setting
// template-canvas.php seems to be included by default
//add_filter( 'template_include', 'fse_bbpress_template' );
add_filter ( 'bbp_template_include_theme_compat' , 'fse_bbp_theme_compat' );
}
}
add_action( 'after_setup_theme', 'fse_bbpress_support' );
and this little helper function helped me figure out what template was getting loaded in the first place:
function fse_bbpress_print_template() {
if ( is_bbpress() ) {
//echo at the bottom of the page visibly
echo get_page_template();
// or echo the template silently as an HTML comment
// echo '<!-- ' . get_page_template() . ' -->';
}
}
// DISABLE THIS ACTION HOOK AS SOON AS POSSIBLE! DO NOT LEAVE IT ACTIVE WHEN DEBUGGING IS DONE!
add_action( 'bbp_template_after_forums_loop', 'fse_bbpress_print_template' );
I’ve tried this on a few different FSE Block themes, and BBPress is displaying properly, and the style tweaks from the wonderful Style-Pack plugin are being applied.
Like I said, it’s working regardless of the $bsp_style_settings_theme_support[‘twentytwentytwo_activate’] setting within the BSP plugin, but it uses the template from the plugin so it would still need to be installed an active, even without any styling tweaks applied.
It’s not a permanent solution, but perhaps aspects of this could be applied to the BSP plugin, or your own custom solution.
For what its worth … when it comes to breadcrumbs I am using these two plugins together:
Breadcrumb NavXT
Breadcrumb NavXT bbPress Extensions
I have sub forums and it all works well, once it is set up correctly.
Hello,
Thank you for such great plugin, very promising so far.
I have a few questions regarding login/ register. Yes, I have searched through the documentations and support but could not find any answer regarding these.
Installed theme/ plugins: free Astra theme, wp 6.0.2, bbpress 2.6.9, bbp style pack 5.0.8.
1. I have set up login box in the sidebar, and I would like to remove the default login box below topics/ posts. How is this done?

2. What is the best way to reduce the size of the login background box? I have attempted using SiteOrigin but when I it I’m shown the hover attribute so I can’t identify it to make the adjustment.

3. I would like to also try placing login link in below the main menu (like its done here in bbpress forum). How is this done? I do have “bbp style pack” plugin installed, but it places the login in the main menu bar, which I do not want.
Thank you in advance.
or you could just display the bbpress breadcrumb by by changing the css file, or putting this in the custom css
.bbp-breadcrumb {
display: block !important;
padding-top: 20px;
}
your theme is hiding the bbpress breadcrumbs in
https://renaloo.com/wp-content/themes/digiqole-child/assets/css/custom.css line 2281
This function will add a reference to the breadcrumb
add_action ('bbp_template_before_single_topic' , 'rew_forum') ;
function rew_forum () {
echo '<div class="rew_forum">' ;
$topic_id = bbp_get_reply_topic_id() ;
$forum_id = bbp_get_topic_forum_id() ;
echo '<a href="' . esc_url( bbp_get_forum_permalink( $forum_id ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $forum_id ).'</a>' ;
echo '</div>' ;
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
At a guess, I’d say that bbPress, like WordPress, uses oEmbed to embed media. WP maintains a list of oEmbed providers whose URLs will automatically be converted to media embeds. The URL in your screenshot looks like it’s a custom CDN hosting an mp4 file, which likely can’t be converted this way. To test this, try using a YouTube video’s URL instead. You may use WPTrains forum to understand further.