add_filter('bbp_before_has_forums_parse_args', 'rew_hide_forums');
function rew_hide_forums($args='') {
$args['post__not_in'] = array('31867');
return $args ;
}
where 31867 is the ID of the forum you want to hide, you can do multiple using array('31867', '45655')
etc.
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
ok, so you need to work out what is causing this by disabling your code and plugins til you work out what combination is the issue
Hi, I enable both full visual and text editors in my forum using bbp Style Pack. I found that the colour picker for text doesn’t work for every post I tested.
To better describe the issue, pls see screenshots below:
Before submission:
After submission:
It seems that the html code for text colour is not sent after submission.
Regards.
Hi
We’re getting strange PHP Error messages relating to forum posts that don’t exist like this one. Should we be concerned?
Many thanks
Robert
WordPress database error Duplicate entry ‘8702-67865’ for key ‘PRIMARY’ for query INSERT INTO ggx_gdbbx_tracker
(user_id
, topic_id
, forum_id
, reply_id
, latest
) VALUES (8702, ‘67865’, ‘11504’, ‘72638’, ‘2024-05-15 06:40:25’) made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), apply_filters(‘template_include’), WP_Hook->apply_filters, bbp_template_include, apply_filters(‘bbp_template_include’), WP_Hook->apply_filters, bbp_template_include_theme_compat, BBP_Shortcodes->display_topic, bbp_get_template_part, bbp_locate_template, load_template, require(‘/plugins/bbpress/templates/default/bbpress/content-single-topic.php’), do_action(‘bbp_template_after_single_topic’), WP_Hook->do_action, WP_Hook->apply_filters, Dev4Press\Plugin\GDBBX\Features\ActivityTracking->latest_users_topic, Dev4Press\Plugin\GDBBX\Database\Main->track_topic_visit, Dev4Press\v47\Core\Plugins\DBLite->__call, call_user_func_array
ok, so I’ve added this ability into my style pack plugin
bbp style pack
it is automatically there once you have activated the plugin, so just see SO TO BULK MOVE… below
OTHERWISE IF YOU PREFER TO USE CODE then
add_action( 'bulk_edit_custom_box', 'rew_quick_edit_fields', 10, 2 );
function rew_quick_edit_fields( $column_name, $post_type ) {
switch( $column_name ) {
case 'bsp_topic_forum': {
echo rew_bulk_edit_forums () ;
break;
}
case 'bbp_topic_forum': {
echo rew_bulk_edit_forums () ;
break;
}
}
}
function rew_bulk_edit_forums () {
// Start an output buffer
ob_start();
?>
<fieldset class="inline-edit-col-left">
<div class="inline-edit-col">
<p>
<label for="bbp_forum_id"><?php esc_html_e( 'Forum:', 'bbpress' ); ?></label><br />
<?php
$no_forum_str =
/* translators: — is encoded long dash (-) */
esc_html__( '— No forum —', 'bbpress' );
bbp_dropdown( array(
'show_none' => $no_forum_str,
'selected' => bbp_get_form_topic_forum()
) );
?>
</p>
</div>
<?php
// Output the current buffer
$output = ob_get_clean();
return $output ;
}
add_action( 'save_post', 'rew_bulk_edit_save' );
function rew_bulk_edit_save( $post_id ){
// check bulk edit nonce
if ( ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'bulk-posts' ) ) {
return;
}
// update the forum
$forum_id = ! empty( $_REQUEST[ 'bbp_forum_id' ] ) ? absint( $_REQUEST[ 'bbp_forum_id' ] ) : 0;
remove_action( 'save_post', 'rew_bulk_edit_save' );
// update the post, which calls save_post again.
wp_update_post( array( 'ID' => $post_id, 'post_parent' => $forum_id ) );
// re-hook this function.
add_action( 'save_post', 'rew_bulk_edit_save' );
}
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
SO TO BULK MOVE…
go to dashboard>topics and use the tick boxes to the left of each topic to select the ones you want
then above the topics use the ‘bulk actions’ to select ‘edit’
and click ‘apply’ to the right of that
You will the see a dropdown box labelled ‘forum’ which lets you set which forum to change those topics to,
and click ‘update’
Hi. So the member if he/she tries creating a group with the same name that already exists, the member is told “Group name exists, cannot make”, and stops group creation. Can you send how to implement this on buddyboss budypress? If you can also force a format type for words so no duplicates are ever made this way in input group-name ID input field, would also be great. Say you want to make a group for each flower that exists. 3 different users right now can make a group for Rose, Rse, Roseee, but these are in essence duplicates. What is the workaround here or can you send some code to help with this?
I’m just a guy sat in his kitchen trying to help others, I am not paid to do this.
It is entirely relevant in that they may well be a reason why trashed posts are added, without knowing when and why the function is called and how it is used, it is impossible to say that the code is wrong.
I agree that a filter before that or variable passed would be helpful, but bbpress is not being actively worked on at the moment so it is unlikely that this would get updated.
If you want to flag this, raise a ticket on https://bbpress.trac.wordpress.org/
You might want to use bbp_get_public_child_ids or use the filter at the end of the function to as you say ‘override’ the setting, or if you are using this function directly, then simply create your own version of it.
Is that relevant? This is in custom child theme code. When I call bbp_get_all_child_ids()
from code, either:
1) I should not get ‘trash’ posts, or
2) There needs to be a way to override post status for the query
I haven’t traced the code through, but the ‘_bbp_total_topic_count’ post meta is getting decreased when the post is trashed. What’s visible and the count of what’s visible should definitely agree with each other.
The bbp_get_all_child_ids()
function in bbpress/includes/common/functions.php
is returning Trashed posts, which should objectively not be the case. There’s no world in which trashed posts should appear unless someone is intentionally digging in the trash.
Line 1997 is currently this:
$not_in = array( 'draft', 'future' );
It should be this instead:
$not_in = array( 'draft', 'future', 'trash' );
I have tested that as a manual change, but obviously, this needs to be bbpress’ default behavior, not my locally-hacked override.
Alternatively, you could add a third argument for overrides, but I think this is just an oversight.
Thank you.
Hi there, it’s great that you’ve added your sitemap to Bing! For the ‘H1 tag missing’ notice, you might want to check your website’s template or code to ensure that it includes a proper H1 tag on all pages, including reply and topic pages.
Hi all,
I think I have a better solution. Add the following to your themes functions.php:
function make_post_type_public() {
global $wp_post_types;
$wp_post_types['topic']->public = true;
$wp_post_types['topic']->show_in_nav_menus = true;
}
add_action('init', 'make_post_type_public');
Then “Topics” will show up in your Elementor template conditions and you don’t need to mess with the other solutions which seem a little clunky. Works well for me and hope it works for others!
ok the code above will not help, and should be removed.
I’d guess that because the subscription messages are being sent from ‘noreply@’ you website, your email system is rejecting this as an invalid address.
Try installing
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Subscription Emails
and change the address in item 1 to the email address that you are getting valid site emails from, and see if that solves.
great – hopefully that will fix, but I cannot see why that line of code
should be causing a problem.
that line of code is related to the replies widget – as a test try disabling that widget and see if it makes a difference
Hi
I’m having the same issue with notifications of replies and new topics not being sent by email.
Plugins installed:
Simple WordPress Membership
bbPress
bbp style pack (notifications enabled)
bbPress Members Only (forum set to members only with all other pages visible)
bbPress Notify (No Spam)
Check & log email (nothing logged in tests)
Code Snippets (original code above added)
Easy WP SMTP (confirmed that other emails are sending successfully, eg notification of new member registrations via Simple Membership)
WP Notification Bell (new replies ARE showing up here)
I’ve run tests with replies and new topics for a test user subscribed to everything (and directly to the topic used to test replies), and am still not getting any emails. Have, of course, checked the spam folder.
I’d appreciate any suggestions for troubleshooting.
Thank you!
Hi Robin et al.,
we are trying to start using Elementor Single Post template, but found out that “Hello theme Elementor bbpress template fix” somehow stops the template from activating (disabled all plugins, found out that now the template works and then enabled all our plugins one by one).
Question 1: What does the plugin actually do? 🙂 I remember activating the plugin for some real need, but now it looks like the forums works just fine.
Question 2: What could we do to get the template working (apart from deactivating a probably vital plugin mentioned earlier..). I saw one guy solving the same issue by adding a short code to a page, but at least just inserting a short code for the forum index did nothing for us.
Our (staging) site and a Post which is affected by this https://staging11.pokerifoorumi.org/derk-van-luijk-nousi-ept-monte-carlon-paaturnauksen-voittoon/
All our plugins are up-to date, and so is our Hello theme.
Many thanks for the great product, as well as your help. Much appreciated.
Hi
I tried your plugin, what would be the code I need to write in order to get the forum title?
New Topic Email Title
[Academia Astrologia Avanzada MB] {title}
The subject of the notification email
Allowable codes – {site_title} {title}
use this css
.bbp-login-form {
display: none !important;
}
Is there CSS or some code I can use in code snippet to remove it?
Hello, I’m very excited to use BBPress on my website! My website already has a login form. So, I really need the login form removed from BBPress because for some reason it doesn’t work. After putting in the username and password it redirects to my login page where they have to re-enter the information.
The “Log in” button is “ok” since it directs to the login page. But, I would rather not have that either since I already have login button in my navigation.
I searched a few times on this over the last few days and even asked the plugin developers I’m using if they knew of a way to resolve this. I can’t find anything. I have Code Snippet plugin if someone wants to offer some code for that. Or is there some CSS that would just hide all that and remove the space it occupies?
Website is VeganLinked.com and there’s a link to forums in the very top navigation and footer.
Newest version of WP and BBPress.
You keep repeating the issue – I fully understand the issue.
1. I am not paid to do any of this – I try and spend around hour a day helping others as people have helped me over the years, but I have a full time job.
2. I have bbpress and 6 other plugins that I try to help.
3. I receive 30-40 emails a day on many things, and I do not keep old emails.
4. If I had access to your site a. I would have deleted any details b. It is not up to me to get you site working, if I ask you for details I do not expect to have to look them up myself.
so if you are running both my plugin and adding snippets you are very unlikely to get to any solution. Consider my plugin to be blue paint, and you snippet to be red paint. If you run both, the room you want to paint might end up red because that is the only color that got painted, or red because it was pained blue first and then painted red. Only by having one bit of code running do you get a true test.
so to fix your site.
1. do not have any other attempts at solutions
2. use the auto login in my style pack
3. tell me if it works in staging – ie it goes to login and then to the topic
4. tell me if it works in live – – ie it goes to login and then to the topic
5. tell me the settings you have in
dashboard>settings>bbp style pack>plugin information>subscription emails
copy/paste here or send to me by email
for both live and staging
If you do not understand what this means, the use google to translate or find someone who can understand this.
Added @contemplate’s solution to bp-custom.php
, time has broken something as there is now no change in behaviour.
that code will do nothing useful, but i do not intend to spend time on other peoples solutions.
The bbp style pack plugin contains the solution, but until you tell me how you have it set up, and give me consistent answers as to what it works on and doesn’t work on I cannot help further
Ce code ne servira à rien, mais je n’ai pas l’intention de passer du temps sur les solutions des autres.
Le plugin bbp style pack contient la solution, mais jusqu’à ce que vous me disiez comment vous l’avez configuré et que vous me donniez des réponses cohérentes sur ce sur quoi il fonctionne et ne fonctionne pas, je ne peux pas vous aider davantage
Hi!
I have just installed bbPress, configured the settings, and created some categories/forums, but when I go to the link where the forum should have been, I only see a blank page.
I have tested with the shortcode, and added that to a blank page. That works, but links to posts and categories open up as blank pages