You may be using one of the new FSE themes, so you need a fix to work with bbpress.
install
bbp style pack
once activated, navigate to
dashboard>settings>bbp style pack, and you should see the first tab called ‘Theme Support’ – if you don’t see this, come back.
In that tab, select
Enable Theme Support
and save
The forums should then display
If not, come back
I have some updated code for you to try, after installing that ACF plugin I realized it wasn’t saving the post meta(your custom fields) before the mail was being called.
So you’ll need to remove all the code previously listed including the first function, and try the below instead.
So all you should have added is the below in your code snippets plugin, or functions.php file.
if( function_exists( 'bbp_get_topic_post_type' ) ){
function newtech2_bbpress_new_topic( $post_id, $post , $update, $post_before ){
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) return;
if( !function_exists('bbp_get_topic_post_type') ){
return;
}
if ( bbp_get_topic_post_type() !== $post->post_type || ! is_admin() ) {
return;
}
if ( ! in_array( $post->post_status, [ 'private', 'publish' ] ) ) {
return;
}
if( isset( $post_before->post_status ) && $post_before->post_status == 'draft' ){
do_action( 'bbp_new_'.bbp_get_topic_post_type(), $post->ID , $post->post_parent, [] , $post->post_author );
}
}
add_action( 'wp_after_insert_post', 'newtech2_bbpress_new_topic', 10, 4);
}
if( !function_exists('acf_email_bbp_subscription_mail') ){
function acf_email_bbp_subscription_mail( $message, $topic_id, $forum_id, $user_id ) {
if ( function_exists( 'get_field' ) && $topic_id != 0 ) {
$afc_replace = array(
'{catch_date_time}' => get_field( 'catch_date_time', $topic_id),
'{anglers}' => get_field( 'anglers', $topic_id )
);
$message = strtr( $message , $afc_replace);
}
return $message;
}
add_filter( 'bbp_forum_subscription_mail_message' , 'acf_email_bbp_subscription_mail', 100 , 4 );
}
You’ll just leave the below in your email template as before.
Catch Time: {catch_date_time}
Anglers: {anglers}
Hopefully that works out for you
They are not in a template but in a functions run through filters, so if you were using bbpress without any plugins for email templates then the function it’s being called from is bbp_notify_topic_subscribers
and the filter to change the message is bbp_subscription_mail_message
.
You can’t just added function with the same name, because it will cause your site to throw errors. But you can use the filter to change the message.
Are you using bbp style pack template? If so give me the field name of one of you custom ACF fields for when you create topics, and I’ll see if I can come up with something for you.
Whoops. I am wrong. IT IS NOW WORKING! I need to test auto login and some other features since this is a private forum.
One issue that I do not think can be solved is I am using ACF plugin for Custom fields within topics. The email notification only has the topic text, it does not include any of the custom field results. Assume no one know how to resolve this. ACF plugin support will not help because they know nothing about bbpress.
The reason I have forum users posting in the backend is because I could never get the ACF plugin to work properly on the frontend.
Thanks!
I put the following code within my theme’s functions.php file. I created a topic under the only forum I have on the site. I published it. Subscribers never received the notification. I checked emails log. It does not show any email being sent out. I am still wondering if the issue can be that if a topic is created within the backend instead of frontend could be causing the problem.
/**
*begin edit for subscribe notification to work
*/
if( function_exists( 'bbp_get_topic_post_type' ) ){
function newtech1_bbpress_new_topic( $post ) {
if( isset( $post->post_type ) && $post->post_type == bbp_get_topic_post_type() ){
do_action( 'bbp_new_'.bbp_get_topic_post_type(), $post->ID , $post->post_parent, [] , $post->post_author );
}
}
add_action( 'draft_to_publish' , 'newtech1_bbpress_new_topic', 10 );
}
/**
*end edit for subscribe notification to work
*/
I don’t have a multi site set up with bbpress, but try the below and see if that works for you. Would have to add to the code snippets plugin or your theme’s functions.php file
if( !function_exists('mh_bbp_get_multi_site_total_users') ){
function mh_bbp_get_multi_site_total_users( $count ) {
if ( is_multisite() ) {
$args = array(
'blog_id' => get_current_blog_id(),
'fields' => 'ID'
);
$count = count( (array) get_users( $args ) );
}
return (int) $count;
}
add_filter( 'bbp_get_total_users' , 'mh_bbp_get_multi_site_total_users', 100 );
}
Will try posting again..
You can try the below code, either add it to your theme’s functions.php file, or use the code snippets plugin.
Make sure to select your “Forum” when creating a topic and make sure the forum has subscribers to test it out on.
if( function_exists( 'bbp_get_topic_post_type' ) ){
function newtech1_bbpress_new_topic( $post ) {
if( isset( $post->post_type ) && $post->post_type == bbp_get_topic_post_type() ){
do_action( 'bbp_new_'.bbp_get_topic_post_type(), $post->ID , $post->post_parent, [] , $post->post_author );
}
}
add_action( 'draft_to_publish' , 'newtech1_bbpress_new_topic', 10 );
}
Thanks for the feedback, @robin-w.
I noticed the anchor element with the class “bbp-glance-users” (from bbpress/includes/admin/metaboxes.php), which appears in the dashboard_right_now/”At a Glance” widget, is exclusively created by the bbPress plugin through the ‘dashboard_glance_items’ WordPress hook. For a multisite, the Users count is coming from the entire network.
I’ve traced the Users count number back to this function (from bbpress/includes/core/abstraction.php):
function bbp_get_total_users() {
$bbp_db = bbp_db();
$count = $bbp_db->get_var( “SELECT COUNT(ID) as c FROM {$bbp_db->users} WHERE user_status = ‘0’” );
// Filter & return
return (int) apply_filters( ‘bbp_get_total_users’, (int) $count );
}
And I was wondering if this could be updated to check if the site is a multisite and then select the Users based on the individual site ID.
Thanks,
Matthew Huntley
this is WordPress related not bbpress, suggest you post to WordPress support
Hi bbPress Folks,
I currently have a WordPress multisite installation with several individual sites. My WordPress version is 5.9.1 and the bbPress version is 2.6.9.
On any given individual site’s WP Dashboard, in the “dashboard_right_now”/”At a Glance” section, the number of users shown is reflective of the total number of users on the entire multisite network, as opposed to the total number of User on the individual site.
When it comes to multisite installations, can the output logic for this Users number be updated to reflect the number of Users for an individual site instead of the entire multisite network?
Thanks very much,
Matthew Huntley
You could try the below
.bbpress.topic-template-default .cs-entry__header{
display: none;
}
Finally getting back to this topic.
I have installed the ‘check and log email’ plugin. It shows all other plugins are sending out emails, but bbpress is not sending out emails to subscribers. What could be the issue.
The way we use bbpress is that the topics are posted via the backend. All users are posting as moderators. Would there be any reason that would be preventing email notifications from being sent. I do not see any reason that would be the case.
Bonjour,
Je dois transférer un forum bbpress de l’ancien site au nouveau site.
Dans l’ancien site, je n’ai pas les champs forum/sujets/réponses dans le dashboard WordPress, rien qui puisse m’amener dans les paramètres de bbpress (même en passant par la section extension, pas de lien réglage ou paramètre sur bbpress).
J’ai essayé un export/import par csv ça ne fonctionne pas mon forum reste vide sur le nouveau site.
J’ai essayé via le ftp idem.
Comment je peux faire pour récupérer les données du forum et les transférer dans le nouveau ?
En vous remerciant pour votre aide.
Custom code is required for displaying it in your forums. You should insert the provided code into either your functions.php file, bbpress-functions.php file, or a functionality plugin.
https://storysaver.page/
Hello,
we have a website with bbpress and Buddypress. In some topics there are gaps in the counter menu_order, so that the pages are calculated incorrectly. For example, a topic with 80 replies has menu_order up to >90, so the reply links link to a page that doesn’t exist.
Is there a way to fix the menu_order? And why are there such gaps?
Hi there. I am using bbPress plugin for a medical forum webiste. For some reasons, my Disputo Rating System Plugin is not working on my Forum page. When I try to like or dislike a topic or a replie from a specific topic, the system shows me an POST 500 (Internal Server Error) in my Console. I have to mention that the Rating System plugin is working on my Blog page, so I can like or dislike an article or a comment from an article.
I tried to deactivate the Ultimate Member Plugin and the error no longer displayed in Console, but the Rating Plugin is still nonfunctional.
I tried to find the “Vote on Forum Posts” permission from Ultimate Member Plugin, but I can’t find it. Is there any workaround I can fix this ?
All Rating System settings are very well set.
Error log:
[21-Feb-2024 12:16:17 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /home/consul15/public_html/wp-content/plugins/disputo-rating-system/posts-pages.php:81
Stack trace:
#0 /home/consul15/public_html/wp-includes/class-wp-hook.php(324): disputo_system_like_button(”)
#1 /home/consul15/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
#2 /home/consul15/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#3 /home/consul15/public_html/wp-admin/admin-ajax.php(188): do_action(‘wp_ajax_disputo…’)
#4 {main}
thrown in /home/consul15/public_html/wp-content/plugins/disputo-rating-system/posts-pages.php on line 81
WP 6.4.3 bbpress 2.6.9 site web
When I display the forum only the topics/replies from the connected account are visible, I would like to see all the current topics
Thats it! Is there a way to set up even bbpress style pack for hidding longer messages so it only shows like 150 word and then the classic ¨show more¨ button
Is that possible?
it’s not a general issue – there are 100,000 websites using bbpress.
yes, on bbpress forums.
I got the code from Chat GPT which ensured me that it would work (ie. clicking send would call the function and execute it) and gave me a few other pieces of more or less similar type of code. As you can see I am quite clueless on this stuff albeit I used to know some Python.
How to proceed..
This is related to this https://bbpress.org/forums/topic/poker-hand-histories-not-converted/#post-237481
We have some freelance developers helping out but they didn’t understand at all what I was trying to accomplish, so I am set to do this “alone” for now, with not much success :/
ok so unless you have some further code, nothing is calling that function.
I presume this is content on bbpress topics and replies – yes?
hi,
I am trying to parse pasted text into something else, where the simplest thing is to change :spade: :club: :diamond: and :heart: to be visualized as ♠♣♦ and ♥ but my solution is not working.
In the Theme files I edited functions.php by adding the following code (in the staging environment)
// Function to replace suit representations with symbols
function replace_suit_symbols($hand_history) {
// Replace suit representations with symbols
$hand_history = str_replace(':spade:', '♠', $hand_history);
$hand_history = str_replace(':heart:', '♥', $hand_history);
$hand_history = str_replace(':diamond:', '♦', $hand_history);
$hand_history = str_replace(':club:', '♣', $hand_history);
// Return the modified hand history
return $hand_history;
}
But when I write “:spade”, for instance, nothing changes. What am I missing?
Hello Theme, WP 6.4.3, bbPress 2.6.9.
Bonjour,
I setup my forum in using BBpress, there is the IP number under the photo of participant,
I would like to remove it, How can I do ?
Thank you very much !
[URL=https://www.hebergeur-image.com/][IMG]https://www.hebergeur-image.com/upload/91.161.191.107-65cb8d8da9d12.JPG[/IMG][/URL]
ok, so we are back to the fault finding
It’s not twenty twenty four as I’ve just double checked that, so I’d suspect another plugin if you are happy that your role has keymaster.
so use the healthcheck tool to test you site with just bbpress and your theme, and then add back plugins until you get the problem
I did make a mistake in either clicking the wrong option or not saving it when making a change in the the theme support tab in bbp style pack. Now the discussion forms are showing up on the frontend of the website when you go to https://turnaroundinterview.com/forums. However, there is still no Forums tab in the dashboard or any sight of bbPress in the settings menu.
Any clues now?
BTW, thank you for your help with this. My frustration has been boiling and sorry if that becomes apparent 🙂