This is fantastic — I will definitely test this out.
Am I right in thinking that the two times this line appears:
if ($user_id == 57) $signature 'signature for user 57' ;
Should actually read as:
if ($user_id == 57) $signature = 'signature for user 57' ;
Hi
We’ve got an issue after upgrading bbPress to 2.6.x:
The “latest reply” column on the forum index page isn’t showing the real latest reply. Instead, we see the latest reply as it was just before the upgrade to 2.6.x.
None of the replies after the update are displayed.
This happens only at the forum index, not on the sub forum index pages; the sub forum index page shows the right latest reply.
The options to repair/recalculate didn’t correct the information in the “latest reply” column.
We’ve seen this on 2.6.1 and 2.6.3.
We did a downgrade to 2.5.14 twice, once after 2.6.1 and once after 2.6.3, we did every time the repair/recalculate, and we’ve got the column working good again with the right and expected “latest reply”.
URL: http://www.lotgenotenseksueelgeweld.nl
Note: It’s in Dutch localized.
bbPress version now: 2.5.14
We have the forum index built by using the shortcode [bbp-forum-index] .
For the sub forums, we use the corresponding shortcode with the ID of the sub forum.
WordPress version 5.3.2.
PHP version 7.3.12.
Anyone else having this situation? How did you get it solved?
Or could this be a bug in the bbPress?
try this
add_action( 'bbp_template_before_user_profile', 'rew_add' );
function rew_add () {
echo '<META NAME=”ROBOTS” CONTENT=”NOINDEX, NOFOLLOW” />' ;
}
NVM i found the code it does work , but i cant get the page ID to work correctly
Thanks for the quick reply and detailed steps @robin-w. Really helpful.
Wondering if the Meta can be added through PHP instead of using a child theme?
I use the Snippet plugin to add and keep track of code, so I don’t lose track of these customizations (and potential conflicts) in the future. So a PHP hook will be really useful.
try this in the custom css area of your theme
#bbpress-forums {
margin-top: 30px !important;
}
and adjust the 30px to suit
of course this presume you have a child theme
Functions files and child themes – explained !
Hi
The user profile pages of my bbPress forums are getting indexed in google.
Example pages
https://domainname.com/users/displayname/
https://domainname.com/users/displayname/topics
https://domainname.com/users/displayname/engagement
https://domainname.com/users/displayname/replies
So I want to add <META NAME=”ROBOTS” CONTENT=”NOINDEX, NOFOLLOW” />
to all the above pages
I think I need to insert the META into wordpress > wp-content > plugins > bbpress > templates > default > bbpress > user-profile.php
But I don’t want to edit the plugin file and lose the change during plugin update.
Is there a PHP code I can use to make the insertion to the user-profile.php
?
Thanks in advance for the help
presuming ‘replace_text’ does the heavy lifting, then
add_filter( 'bbp_get_reply_content', ‘replace_text' ) ;
add_filter( 'bbp_get_topic_content', ' ‘replace_text’ );
with replace text looking like
replace_text ($content) {
//stuff to do the replacing....
return $content ;
}
untested but try
add_filter( 'bbp_get_reply_content', 'rew_reply_signature', 1, 2 );
add_filter( 'bbp_get_topic_content', 'rew_topic_signature', 1, 2 );
function rew_topic_signature ($content = '', $topic_id = 0) {
$topic_id = bbp_get_topic_id ( $topic_id );
$user_id = bbp_get_topic_author_id( $topic_id );
$separator = '<hr />' ;
$before = '<div class="bbp-topic-signature">' ;
$after = '</div>' ;
if ($user_id == 3) $signature = 'signature for user 3' ;
if ($user_id == 57) $signature 'signature for user 57' ;
if ( !empty( $signature ) )
$content = $content . $separator . $before . $signature . $after;
return apply_filters( 'rew_topic_signature ', $content, $topic_id) ;
}
function rew_reply_signature ($content = '', $reply_id = 0) {
$reply_id = bbp_get_reply_id ( $reply_id );
$user_id = bbp_get_reply_author_id( $reply_id );
$separator = '<hr />' ;
$before = '<div class="bbp-reply-signature">' ;
$after = '</div>' ;
if ($user_id == 3) $signature = 'signature for user 3' ;
if ($user_id == 57) $signature 'signature for user 57' ;
if ( !empty( $signature ) )
$content = $content . $separator . $before . $signature . $after;
return apply_filters( 'rew_reply_signature ', $content, $reply_id) ;
}
Put this in your child theme’s function file – or use
Code Snippets
Hi!
When the forum sends out an email to members the email body contains HTML code. Instead of adding a space between the two lines it ads
. The reply looks normal on the forum page and on the backend.
For example:
This is a test message.
This is a test message.
Topic Link:…….
———–
You are receiving this email because you subscribed to a forum.
Login and visit the topic to unsubscribe from these emails.
Thank you for your help!
Hi folks. I am trying to add the shortcode for a single forum [bbp-single-forum id=$id ]
However I cannot find the ‘forum id’ anywhere.
The bbpress install is new and I have only created one test forum. Nowhere is the ‘test forum id’ listed. I can only see a field for ‘order’ which is by default ‘0’. So I tried the forum id as 0 but nothing appears on the page, I have also tried the id as 1 as it is the only forum created.
Please note that the shortcode for showing ‘all forums’ work as expected on the page.
Any thoughts?
Thank you.
Big thanks!
This worked for me
#bbpress-forums div.bbp-reply-author .bbp-author-name {
width: 100%;
}
#bbpress-forums div.bbp-reply-author .bbp-author-role {
width: 100%;
}
Hi!
I don’t know if this is possible, but I would like to replace the text editor in reply of bbpress by another wysiwyg html editor like this one:
https://summernote.org/
I have some trouble right now. The users on my web site report me that they can’t put any html code in their post like the balise ul/li. I edit their post and repost. The code appear just fine. They can’t use a simple <br/> but I can. Is it the editor of bbpress? Or a permission thing?
Another admin have the same problem also. They post a first reply with a ul/li. The list appear just fine. He post the same code after that one and the content between the ul/li just desappear.
Thank you for your help.
Try adding this to the custom css of your theme
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], textarea, select {
margin-bottom: 0rem;
padding: 0px;
}
It is that the name is so short that bbpress can fit it in the space
you could fix using
#bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author {
width: 100px;
}
in the custom css area of your theme
@nickds the issue is site/theme specific – I cant fix everyone’s theme issues !!
a quick look at your site and the forums page appears to have issues with your theme performing calculations on the css eg
.entry .entry-content > *, .entry .entry-summary > *, .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * {
max-width: calc(6 * (100vw / 12) - 28px);
}
Found it 😉
…/wp-content/plugins/bbpress/includes/common/widgets.php
About line 135 you can add some links…
<div class="bbp-logged-in">
<a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>" class="submit user-submit"><?php echo get_avatar( bbp_get_current_user_id(), '40' ); ?></a>
<h4><?php bbp_user_profile_link( bbp_get_current_user_id() ); ?>
I would like to add some links to the bbpress login widget.
Can someone point me in the right direction.
I can not even find the code of the login widget in my bbpress plugin folder…?
Thanks
Matthias
no idea on the code – style pack still works
Does the above code still work?
I tried to paste into my functions.php and don’t see any difference in breadcrumbs.
Jan 2020 – perhaps bbpress or wp code has changed?
ok, still not quite sure what you are meaning, but suspect
Step by step guide to setting up a bbPress forum – Part 1
and look at section 8 which talks about getting bbpress to use the template you want
My forums can be seen at:
new.telium.io/haast/forums
In case it matters, Im using the Avada theme. (But I can just insert the shortcodes for bbpress where required)
I’m new to WordPress and bbPress, so I apologize if my terminology isn’t quite right 🙂
I have create a pretty page and inserted the BB shortcode which shows all the forums. However, when I open one of the forums, or one of the topics, I find each opening in a fairly generic page.
Is it possible to create nice pages for these, and tell bbPress to open the forum/topic in the page I created? (I don’t like the default page).