Put this in your child theme’s function file – or use
Code Snippets
change the ‘-10 days’ to say ‘-90 days’ if you want 3 months
register_activation_hook(__FILE__, 'bbpress_topic_scheduler');
add_action('bbpress_daily_event', 'bbpress_close_old_topics');
function bbpress_topic_scheduler() {
wp_schedule_event(time(), 'daily', 'bbpress_daily_event');
}
function bbpress_close_old_topics() {
// Auto close old topics
$topics_query = array(
'author' => 0,
'show_stickies' => false,
'parent_forum' => 'any',
'post_status' => 'publish',
'posts_per_page' => -1
);
if ( bbp_has_topics( $topics_query ) )
while( bbp_topics() ) {
bbp_the_topic();
$topic_id = bbp_get_topic_id();
$last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
if ($last_active < strtotime( '-10 days') )
bbp_close_topic( $topic_id );
}
}
Writers Abroad
Wordpress version 5.3.2–en_GB
Is there a programme/plugin for Archive settings where I can archive topics after a given amount of time, e.g. 3 months, to tidy up forums?
Thanks in advance
Jo
if you want to improve the code, just add an item to my support page
https://wordpress.org/support/plugin/bbp-style-pack/
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Forum Templates
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Freshness Display
Hi,
Did you try asking the developer of that plugin?
You can post on their support page here:https://wordpress.org/support/plugin/bbpress-post-topics/, other users of that plugin might be able to help if you post on there.
Oh sorry, no it doesn’t do that, it just emails the user you mention.
This one https://wordpress.org/plugins/comment-mention/, seems to show the mentions block you’re wanting, but looks like it would need to be changed to work in the bbPress comment editor.
Sorry, I guess this is still an open ticket, right?
https://bbpress.trac.wordpress.org/ticket/3297
Hi there,
We seem to be getting some discrepancies around the panels which include the following for example:
—
‘This forum has 3 topics, and was last updated 3 weeks, 5 days ago by Name Surname.’
Viewing 4 topics – 1 through 4 (of 4 total)
—
Sadly on our set-up, these stats don’t seem to be matching up to the actual real edits, ie it states 3 topics, when there are 4, which you can see by the second line the system displays, it says ‘Viewing 4 topics’ yet above it says there are only 3 topics?
Is this standard, and maybe we are just misunderstanding what it’s counting? If anyone has any advise that would be so much appreciated :).
We are using:
– WordPress v: WordPress 5.3.2
– bbPress v: Version 2.6.4
– Sadly can’t include a link as it’s behind a login restricted area but we can liaise if anyone can help and facilitate this access
Thanks ever so much,
Tonya
not used elementor, but this should let you style bbpress
bbp style pack
The Divi Theme Builder Header is not loading on BBPress search results. Instead, it looks as though it is loading the default WordPress header.
Incorrect header
http://iytawebsite.staging.wpengine.com/forums/search/introductions/
Correct Header
Home
I contacted Elegant Themes already and they directed me here.
Thoughts?
Wordpress v5.3.2
BBPress v2.6.4
I suggest you install the plugin Snippets:
Code Snippets
Then you can create a snippet and put it there.
Put this in your child theme’s function file – or use
Code Snippets
Hello,
Easiest way would be to override the bbpress’s content-single-topic.php file and move bbp_get_template_part( 'form', 'reply' ); to above bbp_get_template_part( 'loop', 'replies' ); within that file.
For another option, I’ve tried the below on a few different themes without any issues. You’d add the below code to your theme’s functions.php file. Best if you add to child theme so that you don’t have to re-add if you update your theme, same would apply for the first option above.
if ( !function_exists( 'oscowordpress1_move_bbpress_reply_form_filter' ) ) {
function oscowordpress1_move_bbpress_reply_form_filter( $template , $slug , $name ) {
if ( is_array( $template ) && in_array( 'form-reply.php', $template ) ) {
remove_filter( 'bbp_get_template_part', 'oscowordpress1_move_bbpress_reply_form_filter', 10 );
return array();
}
return $template;
}
}
if ( !function_exists('oscowordpress1_move_bbpress_reply_form')){
function oscowordpress1_move_bbpress_reply_form( $slug, $name ){
if ( isset( $name ) && $name == 'replies' ) {
bbp_get_template_part( 'form', 'reply' );
add_filter( 'bbp_get_template_part', 'oscowordpress1_move_bbpress_reply_form_filter', 10, 3 );
}
}
add_action( 'get_template_part_loop', 'oscowordpress1_move_bbpress_reply_form', 10 ,2 );
}
Best of luck, and hope one of those work out for you. 🙂
I have zero knowledge of GamiPress…but let’s park that part of the question for a moment 🙂
Like WordPress itself, bbPress supplies a plethora of hooks that will let you write code that listens for various events—such a new topics being created or replies being added—at which point your code can scan for keywords and interact in various ways. I’m not sure exactly what you’re picturing, but having the bot add replies of its own or perhaps even trigger currency transfers in the context of GamiPress are all possibilities.
How easy this would be I guess really depends on what sort of tasks you want your bot to perform and what conditions you wish to be met before it performs them, but certainly bbPress/WordPress by themselves provide a nice foundation to build on top of.
The topics & replies within forums you can change in your WordPress admin area at Settings > Forums below “Topics and Replies Per Page”.
If you want to change the displayed forum amount(shortcode you mentioned), try adding the below code to your functions.php file of your WordPress theme.
if(!function_exists('poco06_bbpress_change_forum_count_display')){
function poco06_bbpress_change_forum_count_display( $args ){
if( is_array( $args ) && array_key_exists( 'post_type', $args ) && $args['post_type'] == 'forum'){
$args['posts_per_page'] = 100; //Change to number of displayed you want
}
return $args;
}
add_filter( 'bbp_after_has_forums_parse_args', 'poco06_bbpress_change_forum_count_display' ,10 );
}
That should increase it to 100, change as needed. There might be a plugin for that as well that others may be able to point you to.
🙂
bbpress just uses WordPress login, so the issue lies with your site/wordpress
Buongiorno,
ho un problema con il forum: alcuni utenti che appaiono iscritti non riescono a fare login utilizzando i dati da loro impostati, pur facendo molti tentativi.
Ecco le info sul mio sito:
Mi è stata installata la versione 5.3.2 di WordPress.
Da poco mi è stata installata la versione 2.6.4 di BBpress.
Il link al forum nel mio sito è questo: https://www.nuovicontesti.com/forum/forum/
Sto usando il tema Twenty Twenty di WordPress.
Grazie,
Federica
hello
i am using bb-press plugin in my theme
i have to add short code in my page with word-press function like this in .php page
“<?php echo do_shortcode(‘[bbp-forum-index]‘); ?>”
it’s not working on .php page
—————————————
but when i create page in wordpress admin section and add shortcode on page it’s working
but on .php page it’s not working
can you please help me what i am doing wrong
Thanks 🙂
Hello,
I’m using bbpress with the DIVI theme and got an issue : the [bbp-forum-index] shortcode returns only 50 forums end no more !
I have also tried with the Twenty Twenty theme and got the same issue.
Any idea how I could display more than 50 forums with this shortcode?
Wordpress 5.3.2 and bbpress 2.6.4
Regards
Pat
In WordPress? Yes, my domain provider has previously given me guidance on that. I try that if it is what you mean?
I just googled ‘A variable mismatch has been detected’ (googling an error is always a good start)
and got this as a thread
https://wordpress.org/support/topic/a-variable-mismatch-has-been-detected-6/
which suggests might be worth you looking at php versions
Hi I wonder if anyone knows a good template for a multilanguage site? I need both English left>right and Arabic right<left. I tried to have a site in Wix but it didn’t work so I will try WordPress but can’t find a template that can handle both languages without problems.
thanks for your help!
Henry
Dear friends,
At some point disappeared text from topics. Cannot say exactly at which moment, because it’s not my web-site, but that of a friend of mine.
All content is present in the database (forums, topics, replies). The TOC of a forum is displayed correctly:
Фотосъемку
But when I click on any link to see the topic with replies, I see the following:
Макросъёмка
No text, but the rest is displayed well, including images.
Settings:
1. bbpress 2.6.4. All other plugins are disabled at the moment (except GD bbPress Attachments, which does not affect). Deleted and reinstalled it from the scratch. Before reinstallation deleted all the settings of bbpress manually from the table wp_options (DELETE FROM on_options WHERE option_name LIKE “bb%”;). No result.
2. WordPress 4.9.9 with generic theme Twentyseventeen. Change the theme to others – no result either.
Please help. Thank you in advance.