ah – thanks – try this
// Force ping_status on bbPress post types
add_filter( ‘pings_open’, ‘rew_force_ping_status’ );
function rew_force_ping_status( $open, $post_id = 0 ) {
// Get the post type of the post ID
$post_type = get_post_type( $post_id );
// Default return value is what is passed in $open
$retval = $open;
// Only force for bbPress post types
switch ( $post_type ) {
case bbp_get_forum_post_type() :
case bbp_get_topic_post_type() :
case bbp_get_reply_post_type() :
$retval = false;
break;
// Allow override of the override
return apply_filters( ‘rew_force_ping_status’, $retval, $open, $post_id, $post_type );
}
}
I dont get it. I copied your code exactly as below. Is there an AND symbol getting in there in the copy function?
// Force ping_status on bbPress post types
add_filter( ‘pings_open’, ‘rew_force_ping_status’ );
function rew_force_ping_status( $open, $post_id = 0 ) {
// Get the post type of the post ID
$post_type = get_post_type( $post_id );
// Default return value is what is passed in $open
$retval = $open;
// Only force for bbPress post types
switch ( $post_type ) {
case bbp_get_forum_post_type() :
case bbp_get_topic_post_type() :
case bbp_get_reply_post_type() :
$retval = false;
break;
// Allow override of the override
return apply_filters( ‘rew_force_ping_status’, $retval, $open, $post_id, $post_type );
}
ok, that is quite ambitious, so well done for getting so far.
As I think you are doing, you should only change files in the templates and then only by copying them to a bbpress folder in your child theme. The originals can (and should) stay in the bbpress plugin file. bbpress will see your files in the child theme and use them instead.
to move the topic content – the word ‘test’ in your example
#bbpress-forums div.bbp-forum-content, #bbpress-forums div.bbp-reply-content, #bbpress-forums div.bbp-topic-content {
margin-left: 0px !important;
}
I put in the code and got a syntax error. I loaded it in just as you wrote it. So it will not run.
Can you check on this please?
Here is what you posted:
// Force ping_status on bbPress post types
add_filter( 'pings_open', 'rew_force_ping_status' );
function rew_force_ping_status( $open, $post_id = 0 ) {
<strong>// Get the post type of the post ID
$post_type = get_post_type( $post_id );
// Default return value is what is passed in $open
$retval = $open;
// Only force for bbPress post types
switch ( $post_type ) {
case bbp_get_forum_post_type() :
case bbp_get_topic_post_type() :
case bbp_get_reply_post_type() :
$retval = false;
break;
// Allow override of the override
return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type );
} </strong>
You can also try Magazine Pro by StudioPress. It’s a bbPress ready WordPres theme with a very professional look and a lot of features.
Magazine Pro Theme
I am trying to configure bbpress for one way announcements to an audience of members in my website. Meaning I as the author am posting topics in chronological order, with no possibility of replies. So not a normal forum.
This has meant removing a lot of extraneous information normally displayed: I don’t need or want author, freshness, voices, etc.
I am new to WordPress, BBpress, and I am not a coder. I have proceeded, through trial and error, to “inspect” the pages and use custom CSS to hide objects that I don’t want (display: none !important), and to look at the php files such as content-single-topic-lead.php and remove any references to author (e.g. bbp-topic-author).
Without understanding much of what I’m doing, I’m getting very close to achieving the intended effect. Now I’m stuck because when someone clicks in Resource Messages (the “forum” name) on an actual topic, they see an indented display of content, because the author column (which normally displays author name and avatar etc, which I hid using CSS display: none !important) is still present (if empty).
Please see https://devgo.jeffbelkora.com/square/topic/20181219-resource-message-2/
So my questions are:
1. Can anyone instruct me on how to remove that first author/avatar column?
2. How to resize column 2, or otherwise adapt it so each topic’s content displays as a left-justified text?
Please be very remedial in any tips you can give me. I have created a “bbpress” subfolder inside my “astra” child theme via “files” in my cpanel. I am deleting code in php files there adding custom css inside the astra child theme “customizer”.
If you are going to suggest changing files, could you please specify how I need to place them in my child theme to make this futureproof to updates etc.?
Thank you!
I should say that I am not the plugin author, just an experienced user.
bbpress just uses wordpress custom posts, so in most cases having the forums within the main site would be no problem. Of course I don’t know your site, so cannot recommend, but most sites just have it within. If the main site is down, chances are that most will not access the forums directly, but rather via the main site, so the forums would ‘appear’ to be down as well.
It is an option to uncheck the box, it is not a recommendation (the box I quoted in settings recommends that you do display the prefix, but I think this is just for clarity in the url).
unticking the box would achieve https://forums.X.com/ and putting the forums in your main site would achieve https://X.com/forums/
I cannot replicate that on my test site, and from its positioning I suspect it is theme related rather than bbpress as it seems to be within after an <article> div that bbpress doesn’t use, and I cannot find ‘comments-area’ anywhere in the bbpress plugin.
If you want to prove that, switch to a default theme and check that it disappears.
the first ‘forums’ is the sub domain where he has installed it (what you call ‘in its own folder) so that cannot be changed.
The ‘/forums/’ is what bbpress uses, you can omit that in the sub-domain wp installation
dashboard>settings>forums>fourm root slug, and untick the ‘Prefix all forum content with the Forum Root slug (Recommended)’
That might achieve your first objective, but probably what you really want is the forums within your site, unless your site is massively complicated or your forums are huge, there is no reason not to have bbpress within your main site
Hello,
I noticed a weird thing, the Admin profile has this empty DIV on its page:
Check it out.
Other profiles don’t have that. Check it out.
It seems to be this here:
<div class="comments-area"></div>
What is this and what is it doing there? How do I remove it? Is it some space for user comments on profiles? And why do other users don’t have that?
Thanks!
By the way I love bbpress, it’s awesome. I used a lot of other forum software (IPB, vBulletin, phpBB), but this one’s really the best!
I paid a website dev to install bbPress forums on our site. bbPress is in its own folder and uses a different database than the stock site.
The url shows up like this: https://forums.X.com/forums/
Is it possible to either get the URL to be either https://forums.X.com/ or https://X.com/forums/ ?
The dev I paid says it’s not possible. That kind of seems strange to me that it wouldn’t be possible.
has been set to 2.6 defect by the bbpress authors
no idea what you are saying, so I’ll leave it there. Bbpress is what it is.
Hi
Why bbPress could use visual editor without chaning the function.php of themes.
When thems needs to be updated, it would need every time alter that function.
In my mind bbPress should support better visual editor. Otherwise bbPress seems to be a little bit too much self-made solution. Not like professional XenForo, which supports visual editor without tricks.
I got it work in https://www.sanaristikkofoorumi.net/wordpress/forums/forum/sanaristikot/
but I was not happy searching how to do it.
This is theme related, it has nothing to do with bbPress, and without providing the link, no one can help you without seeing the issue.
Okay, I GOT IT!
The key is to compare the topic id and the reply id. If they are equal, then its the first reply in bbpress.
Here is my full solution:
<?php
function add_content_before_first_reply_content($content,$id){
$post = get_post($id);
$topic_id = bbp_get_topic_id();
$reply_id = bbp_get_reply_id();
$content_to_add = '';
if ($topic_id === $reply_id) {
// do whatever you need to in here
$content .= $content_to_add;
}
return $content;
}
add_filter( 'bbp_get_reply_content', 'add_content_before_first_reply_content', 99, 2 );
wp v5.0.1
bbpress v2.5.14
How can I hook into the FIRST reply on a single topic page? I want to add an image attachment only to the first reply, but i cannot find how to do so. I hooked into the action “bbp_theme_before_reply_content“, but it adds the image to every reply on the page!
I thought about getting a list of all reply ids, then comparing the current reply id (bbp_get_reply_id()) with the first id in the array, and showing content if they are equal. That would solve the problem. BUT I also failed at getting the list of ids – I tried with bbp_get_all_child_ids
I also wish the FIRST reply in the loop would have a unique id or class, but it does not 🙁
Here is the page:
Meet My New Crested Gecko
PekMez your solution does work, but still modifying the core code will be overwritten on the upcoming update, and we will probably forget about this in the future. So after upgrade our BBPress version we forget to re-modify this code.
Anyway how about now, is there a solution for BreadCrumbs without modifying the core?
Hey, I’m a french user of bbpress and I need your help to solve my problem.
I installed a theme that uses the features of buddy and bbpress, no problem. But when I go on the profile of a user and I click on “my topics = mes réponses” I have a 404 error, while the page “my favorites” works well.
https://livroo.fr/membres/admin7317/forums/ => https://livroo.fr/membres/admin7317/forums/Mes%20R%C3%A9ponses/
but my favorites works for same url
https://livroo.fr/membres/admin7317/forums/
https://livroo.fr/membres/admin7317/forums/Mes%20Favoris/
Could you help me ?
I am looking the same too, I found the bbpress-like-button plugin, judging from the plugin’s descriptions, it looks interesting however it’s closed and no longer be available. I like the like button like Youtube. That would be very great.
Hey,
I use the Woffice theme with bbpress forum. The widgets for latest topics and replys have two hover effects.
1. Underlining of the link
2. Moving the link a few pixels to the right.
I want to remove the second one as it cause the link to sometimes jump around like crazy.
Any ideas how I can do that?
Hi can you help me on how achieve like this when share a topic on facebook(see photo for reference). I get a sample of bbpress topic and share on facebook I always see the word “Topic:” then at the end of the topic the “url” and below is the slogan this is i want to happen when i share a topic on facebook. Just like in the photo. Thanks.
https://prnt.sc/lvn63o
https://prnt.sc/lvn6d3