Hey!
I am kinda new to WordPress and have no experience with coding, but I would like to adjust some details of the forum. Is there a plugin for listed demands? Thank you very much!
1) I would like to change typography of forum and topic title.
2) I want to hide “create new topic widget into spoiler or another eye pleasable format
3) I want to enable replying to individual comments, as in the second picture


PS: I know these might be very trivial questions, but I am total newbie.
I have a solution.
It relies on a couple of assumptions: one being that the structure of URL’s is like this:
‘http://mysite.com/forums/…’
Assumption 2: all users with an account on the website are allowed to access the forum.
This function does the following:
If the user requests a resource under ‘/forums/’ then we test to see if the user has a wordpress account and is logged in. If the user isn’t logged into the wordpress account, then they get denied.
In production I’ve replaced ‘wp_die’ with a wp_redirect to another page.
/**
* If a user is not a forum member, and requests the forum index page then redirect them
*/
add_action('init', 'as_protect_forums');
function as_protect_forums() {
// get the path of the requested URI
$current_url = home_url($_SERVER['REQUEST_URI']);
$path = parse_url($current_url, PHP_URL_PATH) ;
$parts = explode('/', $path) ;
$first_part = $parts[1] ;
if ( $first_part === 'forums' ) {
if ( 0 === get_current_user_id() ) {
wp_die('nope');
}
}
}
Hi @robin-w,
thanks for your reply!
I managed to reproduce my problem:
I created a WordPress instance on wptaste.com, reinstalled the essential bbpress plugins as well as Elementor Pro and Astra Pro, trying to redo my settings by hand, the error did not reproduce , I then exported my settings from the original site to re-import them into the test site and there I got the error.
So I set out to reset my settings in Astra Pro and then redo them by hand, and now everything is back to normal.
I didn’t understand what it was, but I was able to isolate it and find a solution that didn’t take your time.
Thanks for putting me on the trail!
Best regards,
Ludovic from Reunion island 🇷🇪
This whilst old still works well
bbPress – Moderation Tools
I took a look at this, but cannot see what is causing the issue
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
also have
bbResolutions
still works as far as I know
Hello,
that is nice, thanks for your answer.
The Link is: https://www.wordpress-star.de/?cmp_bypass=f9972b4d5956df4904f1958718031e36 and then “forum” in the menu.
Currently only Bypass-Link is possible, due to the fact that the site is not online.
I just realized that being able to set all the posts in a topic to be moderated would also be an acceptable solution. But the two moderation plugins I have found don’t give this functionality.
These are the two I checked:
bbPress – Moderation Tools
bbPress Moderation
Does anyone know of a plugin that might help from this angle?
the easiest way to do this is to allow participant to ‘throttle’ – this then lets them bypass this check
so the code (untested) should be :
add_filter( 'bbp_get_caps_for_role', 'rew_throttle_bypass', 10, 2);
function rew_throttle_bypass ($caps, $role) {
if ($role == bbp_get_participant_role() ) {
$caps['throttle'] = true ;
}
return $caps ;
}
ut 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
on 2. ok, I see this as just a question, with no response
https://wordpress.org/support/topic/attachment-with-empty-text-message-fails/
do you see it differently?
Hello!
I’m trying to filter links that appear in responses. More specifically, they are links that appear in attachments that have been added through GD bbPress Attachments if that matters. I’m fairly sure the code works because it can filter in the content of a page just fine. Here is the code:
add_filter( 'the_content', 'myprefix_use_audio_short_tag' );
function myprefix_use_audio_short_tag( $content ) {
$reg = "#<a .+ href=\"(.+?\.mp3)\".+?</a>#";
$content = preg_replace($reg, "[audio mp3='$1' class='asset-audio' title='']", $content);
return $content;
}
I’m guessing that it shouldn’t be the_content, but I am really working beyond my actual understanding of WordPress. I don’t know if I should be putting a theme file name there or if there is some equivalent to the_content that targets responses in bbP.
Feel free to criticize my regex as well. I’ve actually never used regex in WP/php before.
BTW, my code has been adapted from here: https://stackoverflow.com/questions/55814952/how-to-generate-audio-shortcode-when-theres-an-mp3-in-a-link-tag-in-wordpress
WP 5.8
bbP 2.6.6
there should be an error message at the top saying
Your reply cannot be empty.
but the other plugin may be affecting this.
the quickest way to correct this is to create some content if it is blank.
This filter (untested) will deal with empty content and add a space character.
add_filter ('bbp_new_reply_pre_content' , 'rew_allow_blank_content') ;
function rew_allow_blank_content ($reply_content) {
if ( empty( $reply_content ) ) {
$reply_content = ' ' ;
}
return $reply_content ;
}
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
I have initially set it to change empty content to a single space character ie
$reply_content = ' ' ;
however later checking by WordPress may delete this, so it may need some actual text – maybe like
$reply_content = 'this reply is has no text' ;
Dear bbPress-ers!
Hello. I’m Herman.
I will greatly appreciate your assistance with a couple of problems with my forum I’ve been trying to fix for a couple of days now with no solution.
I wanted to display the message “Replies not viewable to non-members” to anonymous/not-logged-in users browsing my forum. This message replaces all actual replies with the generic one above. I was able to achieve this with the code below found on this page Dezzain website. The problem though is that this message shows up everywhere a reply is posted. So if there are 20 replies, there will be 20 generic messages.
So my request for help #1: I would like the 1 reply ONLY to display the generic message, and the other replies hidden. Any chance you can help me with it please?
#2, I would like to include a link to register/login in that generic reply. I am not too familiar with php. Can anyone rewrite the message below so that it also has a url portion for “Login here” | Register”?
Thanks so very much in advance.
bb_auth_reply_view(
$reply_id
) {
$reply_id
= bbp_get_reply_id(
$reply_id
);
// Check if password is required
if
( post_password_required(
$reply_id
) )
return
get_the_password_form();
$content
= get_post_field(
'post_content'
,
$reply_id
);
// first topic reply shouldn't be hiding
$rep_position
= bbp_get_reply_position(
$reply_id
);
// if user is not logged in and not the first post topic
if
( !is_user_logged_in() &&
$rep_position
> 1 ) {
return
"Replies only viewable for logged in users"
;
}
else
{
// return normal
return
$content
;
}
}
add_filter(
'bbp_get_reply_content'
,
'bb_auth_reply_view'
);
Hi
I created few forums and topics when I press on forums It’s give me the following error:
There has been a critical error on this website.
Learn more about troubleshooting WordPress.
Can you please help
Thank you
Nicola
untested but try this
add_filter ('bbp_new_reply_redirect_to', 'rew_redirect_to_topic', 10 , 3) ;
function rew_redirect_to_topic ($reply_url, $redirect_to, $reply_id ) {
$topic_id = bbp_get_reply_topic_id ($reply_id) ;
$redirect_url = bbp_get_topic_permalink( $topic_id, $redirect_to );
return $redirect_url ;
}
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
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Forum Roles
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Forum Roles
A little update on this too. 🙂
The $count of favoriters is updated correctly on topic’s single page.
But when the $count is called elsewhere, WordPress seems to take the first _bbp_favorite encounter.
Looking at posts’ metavalues, it seems that every ‘favorite’ mention becomes an extra _bbp_favorite

My code doesn’t say anything about taking the highest number – maybe this would be the solution?
$subscriptions = get_post_meta(get_the_ID(), '_bbp_favorite', true) ;
$count = count($subscriptions) ;
$output .= '<li><a href="' . get_permalink() . '">' . get_post_meta(get_the_ID(), 'an_extra_field', true) . '</a><br> <span> Votes :' . get_post_meta(get_the_ID(), '_bbp_favorite', true) . '</span></li>';
}
$output .= '</ul>';
wp_reset_query();
}
return $output;
}
bbp style pack
if that doesn’t help, then link please to a live example on your site