Actually, just found out how to “fix” this … but not sure of the impact.
In file bbpress/includes/replies/template.php there’s two places –
Around line 174, I’ve remarked out the IF statement –
// Set posts_per_page value if replies are threaded
$replies_per_page = $r['posts_per_page'];
/*if ( true === $r['hierarchical'] ) {
$r['posts_per_page'] = -1;
}*/
And around line 250, I’ve made the IF never be true just to try it out –
if ( true === $r['hierarchical'] & 1==2) {
$walker = new BBP_Walker_Reply;
$total_pages = ceil( (int) $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / (int) $replies_per_page );
} else {
$total_pages = ceil( (int) $bbp->reply_query->found_posts / (int) $replies_per_page );
And that works. But what’s the impact of doing that beyond fixing what I wanted? Am I missing something?
Untested, but this should work (put it in theme’s functions.php):
remove_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow' );
remove_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow' );
If you also want to remove nofollow from users’ urls, add this too:
remove_filter( 'bbp_get_reply_author_link', 'bbp_rel_nofollow' );
remove_filter( 'bbp_get_topic_author_link', 'bbp_rel_nofollow' );
muyilleum, put those two lines in your theme’s functions.php after <?php. On pressing save, that code will automatically load and remove the roles. You can then remove the lines because they would not serve any further purpose.
This worked for me. I dropped the code into my functions.php, then removed them when it was done.
Cheers,
Jeff
This seems to work – there may be a better way…
In an over-ride of content-single-forum.php, do something like this:
if ( // some condition ) {
$my_r['meta_query'] = array(
array(
'key' => 'my_key',
'value' => 'my_value',
'compare' => '=',
)
);
}
else
$my_r = '';
Then change bbp_has_topics() to bbp_has_topics( $my_r )
Hello everyone,
Recently we’ve been starting to use bbPress and it seems to be a very rich expansion of WordPress. What I wonder about is this: is it possible to show all sticky topics on your front page, using a shortcode? Say I have a part of my site that is the forum, I would still want to show the sticky topics in a widget in a sidebar, right from the start on the home page. I’ve read about shortcodes listing most popular or most recent topics, but is this possible for stickies too?
Many thanks,
Lucas
It seems that content-single-forum.php is the template to over-ride.
So do I have to pass in WP_Query meta_query args to bbp_has_topics() ?
I’d like to only gather the appropriate topics, so using the supplied apply_filters
apply_filters( 'bbp_has_topics', $bbp->topic_query->have_posts(), $bbp->topic_query );
seems inefficient.
Or is there an easier way?
I managed to remove the area at the header of forum which states this topic has x amount of details etc by placing this code in functions.php
add_filter( ‘bbp_get_single_forum_description’, ‘ja_return_blank’ );
add_filter( ‘bbp_get_single_topic_description’, ‘ja_return_blank’ );
function ja_return_blank() {
return ”;
}
How do I now remove the actual voices part and the numbers which shows, can I do this through functions.php also.
Thanks for help.
Anonymous User 13302461Inactive
Hi. When viewed on an ipad, some of the forum “start topic” or “reply to topic” area is not displayed. For some reason it is not shrinked and the div stays too wide to display all of it, as you can see the bbcode buttons are not all displayed as they are all on 1 row.
However, this div in question shrinks on PC and the bbcode buttons are displayed on multiple rows.
Has anybody got any idea why please?

Thanks for the reply Stephen,
However I’m not sure the shortcode [bbp-forum-index] will help me.
My blog is at website.com/blog. If I create a page called called ‘test’ with that shortcode then it will be at:
website.com/blog/test/
Also that’s just the index page. The actual forum posts/categories etc will still be at website.com/blog/forum/*
Thanks,
Sam
I added a simple check in bbpress/inlcudes/users/capabilities.php to see whether the current user has a role in the current blog, before giving them a forum role:
/** Ready *****************************************************************/
// Load up bbPress once
$bbp = bbpress();
// Get whether or not to add a role to the user account
$blog_role = bbp_get_user_blog_role( $user_id );
$add_to_site = bbp_allow_global_access() && $blog_role != false;
With that in place I can reset all my previous changes so that the default setting for global access is true.
I’ve edited the text in Forums -> Settings to show that ‘global access’ is really now just ‘site access’.
Ideally this would be a separate option in Forums -> Settings, to limit automatic forum access to site members. I will submit a patch if I get the time.
The problem with the default settings is that in a large Buddypress-type site, every time I visit a new site when logged in, that site is added to my My Sites list.
Hey guys, I’m new to BBpress. so I have a few questions that I’m hoping can be solved here.
The theme I’m using has 2 different custom Sidebars and other features that can be enabled and disabled on the page settings.
I’ve created a custom Page template for the forum and tried using the Shortcodes to implement BBpress on the page and it works but once you click something on the page it directs back to the original template. Is there a way to have the whole forum and index and everything on the one page?
Thanks
Great, glad it all worked !
If you’re not using a child theme, then any theme upgrade may overwrite your functions file, so keep a note of the final code you used, as you may need to add it back.
You are correct. The execution of the hooks when creating a new topic was a misobservation on my side. Sorry about that!
The bbp_new_forum hook firing only when a forum is created outside wp-admin is interesting information. Thanks for clearing that up.
I have already worked around the ‘missing’ hooks by tying into the save_post hook. Its not exactly what i would call elegant, and it requires some additional checks to make sure my callback was executed for the right event, but it does the job.
So, the only thing that is left for me to ask is: Why isn’t there an intuitively named hook for when one creates a forum from the backend? Or is there one that i am missing? 🙂
Thank you for your response!
Hi Robin,
That has worked but with a small issue….the image is displaying far bigger than the uploaded file which is 75x75px. What do I need to change in that code to help the formatting?
http://techdev.kemikalkitchen.co.uk/forums/forum/android/
This is on my test server but is the same environment that the final site will reside in.
Many thanks
That doesn’t seem right. bbp_new_forum will only fire when forums are created outside of wp-admin, like in a BuddyPress Group Forum. If you want to add meta when any new forum is created, you’ll likely need to hook into WordPress’s wp_insert_post action, instead.
Add this in a custom plugin or the functions.php of your active theme:
add_filter( 'bbp_allow_global_access', '__return_false' );
You’ll want to undo the edits you’ve made to bbPress’s files, also.
Hi guys,
I’m attempting to import a Xenforo DB over to BBPress. It’s not too large (300 members, 4000 Posts)
When I attempt the conversion I get an error message.
Fatal error: Class ‘Xenforo_Not_Complete’ not found in /home/decerto2/public_html/dev/wp-content/plugins/bbconverter/bbc-includes/bbc-converter-class.php(39) : eval()’d code on line 1
Is anyone able to assist as I am looking at testing before I move my live board
Thanks
For what it’s worth, here is what I ended up doing:
1. I left my “parent” forum as a category.
2. Around line 847 of bbpress/includes/forums/template.php, I added “true” to the if statement to force the “category” parent forum to be shown, as follows:
// No link for categories until we support subscription hierarchy
// @see https://bbpress.trac.wordpress.org/ticket/2475
if ( true || bbp_is_forum_category() ) {
$retval = bbp_get_user_subscribe_link( $r );
}
3. In bbpress/templates/default/loop-single-forum.php I replaced line 44 with the following:
<?php
$subForumList = bbp_forum_get_subforums();
if(sizeof($subForumList) > 1){
echo "<ul style='margin-left: 20px;'>";
foreach($subForumList as $currForum){
// Create the arguments
$r = bbp_parse_args( $args, array('forum_id' => $currForum->ID,
'user_id' => 0,
'before' => '',
'after' => '',
'subscribe' => __( 'Subscribe', 'bbpress' ),
'unsubscribe' => __( 'x', 'bbpress' )
), 'get_forum_subscribe_link' );
$isSubscribed = bbp_get_forum_subscription_link($r);
// see if the returned html has 'is-subscribed' in it
// if it does, then the user is subscribed to the forum
if(strpos($isSubscribed, 'is-subscribed') != 0){
echo "<li>" . $isSubscribed . " <a href='" . bbp_get_forum_permalink($currForum->ID) . "'>" . $currForum->post_title . "</a></li>";
}
}
echo "</ul>";
} // end > 1
?>
Feel free to criticize, pick apart, or provide feedback as you see fit…it works for me.
Well I set the default value for ‘allow global access’ to false in the options file:
function bbp_allow_global_access( $default = 0 ) {
return (bool) apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) );
}
Hopefully that together with my other changes will have done the trick.
Ok, I cracked that code open, and think that putting in the following will work
add_action( 'bbp_theme_before_topic_title', 'assylumn_insert_thumbnail' );
function assylumn_insert_thumbnail() {
echo('<a href="http://www.mysite.com/wp-content/uploads/2013/09/picture.jpg">') ;
echo('<img class="bbp-topic-thumbnail" width="100%" style="max-width: ' . get_option('thumbnail_size_w') . 'px; max-height: ' . get_option('thumbnail_size_h'). 'px; vertical-align:middle;" src="http://www.mysite.com/wp-content/uploads/2013/09/picture.jpg"/>' .'</a>');
}
Obviously you’ll need to change the URL to your image
You’ll need to add this to your functions file, if you don’t know how to do this, come back !
Google search: Topic Tag: email | - Hosting-4-oscommerce.com The topic tag loop needs meta descriptions.
Hi,
I have multisite WordPress 3.8.1 and Buddypress 1.9.1, and have just set up separate forums using the bbPress plugin, v2.5.3
Now everyone who is logged in and visits another site in the network is automatically made a ‘Participant’ of the site they are visiting. I don’t want this to happen.
I have set bbp_allow_global_access( false ) in bbPress includes/admin/settings.php, line 532
I have also set '_bbp_allow_global_access' => 0, in includes/core/options.php, line 37
However, when I visit a new site I am still made a participant of it. How can I disable this option in all my sites (there are thousands) without setting Auto Role to unchecked and saving the forum settings page in each individual site?
Thanks.
@netweb and @martin_c we’re still plagued by hatom which I believe started from our theme because we used shortcode from a page post.
After 3 months and still not a clue, I come back with my question, hoping this time to get a working answer:
I have installed the forum and created a template page called “forum.php” embedding a shortcode for the login form and another for the forums list to be displayed.
The thing is that the login form only appears on the first page of the forum (forums list), but if a visitor is in the “topic” or “reply” page, he will not see the login form anymore and will have to go back to the first forums page in order to login.
I looked into the login widget but this solution displays the login form everywhere on the website, not only on the forum section. Moreover, this solution forces me to have the login form on the header, footer or sidebar when I want it to be inside the forum area.
I also looked into the shortcode solution but to be able to put that shortcode you need a page template. And, as far as I know, the template “forum.php” applies to the first page of the forum, not to the “topics/replies” pages which are accessed through the forums list (also a short code).
Three months and still not a clue.
It would be nice if you could help me on this one.
Having the login form on each page of a forum system is not an odd request…
Thank you.
PS: the external plugin solution is not relevant for me as it is a mutinlingual website with RTL and LTR languages. Finding a plugin which tolerates so many languages is almost not an option and complicates things for no reason as this request is trivial enough. At least, I hope it is…