I’m using the following in my theme’s functions.php, although for some reason is_bbpress() isn’t working on Buddypress Group Forums for me.
if( ! function_exists( 'my_dequeue_bbp_scripts' ) )
{
function my_dequeue_bbp_scripts()
{
if( function_exists( 'is_bbpress' ) )
{
if( ! is_bbpress() )
{
wp_dequeue_style('bbp-default');
wp_dequeue_style('bbp-default-rtl');
}
}
}
}
if( ! is_admin() ) add_action( 'wp_enqueue_scripts', 'my_dequeue_bbp_scripts' );
Currently if I access the user’s profile of bbpress (ex: http://example.com/forums/users/admin/) then it’ll list the profile, topics started, replies started….) from the viewing user.
Is there a shortcode that allow me to display forum user’s profile by user’s id from anywhere besides original bbpress url( ex: http://example.com/test/ )?
I found the bug in plugin with some validates. Never liked if ($var) constructions. if ($var !== false && $var !== '') better to understand 🙂
Just replace content of plugin.php in plugin folder:
https://github.com/korobochkin/bbPress-permalinks-with-id/blob/master/plugin/plugin.php
Tested on brand new WordPress install only with bbPress and my plugin with default theme – works as… haha.
Great response form S2member team !
I’m just a humble user not a dev, but hopefully netweb or JJJ will be in contact with the S2 guys.
For those that have been bitten by this, I know how painful it is, in the early days I just upgraded plugins and wordpress in the belief that they would work until one day my site broke, and I was in panic for 8 hours when I had least time to fix it.
When WordPress announced auto upgrade, I was very suspicious that anyone could release software confident that it would not screw up any of the several thousand plugins based on how it worked!
So the following for those bitten, and others who do not want to be bitten going forward !
If you are not happy for your site to be down for 24+ hours then :
1. Turn off wordpress auto update !
2. Create a test site https://codex.bbpress.org/creating-a-test-site/
yes that takes time, but the comfort of not doing stuff live is fantastic !
3. Don’t do upgrades of wordpress/plugins for the first week (UNLESS they are deemed critical), let others find the faults – yes I know that is bad to say, and if no one upgraded we’d never make progress, and I write plugins that I need people to upgrade to, etc. etc., but many people’s site’s aren’t critical, and if your is, don’t be leading the charge !
4. Check the support forum for the upgrade
for wordpress https://wordpress.org/support/forum/how-to-and-troubleshooting
or your plugins support page
you’ll soon find out if there are issues
5. Upgrade your test site first, the spend some time checking all the critical bits
6. When you’re happy that your test site works, then make the move in live
I really feel for those who have been sent into panic, but maybe the above will help for next time
@rafaeldejongh I think you need to create a test site :
https://codex.bbpress.org/creating-a-test-site/
This will let you work out what’s woring in comfort !
I just happened upon the following post on foliovision.com:
https://foliovision.com/2014/09/wordpress-original-bbpress
The key points are:
We still use bbPress version 1 on some of our websites. It’s powerful and integrates well with WordPress. Alas the recently released upgrade to WordPress 4.0 breaks the integration
WordPress 4.0 changed the cookie format and also the hash function, so without this fix bbPress won’t understand that you are logged in.
I’ve added a link also in the codex http://codex.bbpress.org/legacy/integrating-with-wordpress/
Note: This is only relevant for bbPress 0.9/1.x “Legacy” stand alone version of bbPress and NOT the current bbPress 2.x plugin for WordPress.
I’ve already seen a couple people with the problem but without much avail, I’m not running any plugins mentioned yet I still experience the problem after updating to WordPress 4.0
I’ve already reverted my wordpress installation as I can’t really put the forum out for more than a day, I’m running the following plugins on my site:
Adminimize
AdSense Click-Fraud Monitoring Plugin
amr shortcode any widget
BAW Login/Logout menu
bbPress
bbPress Custom CSS File
BulletProof Security
GD bbPress Tools
Google Adsense Dashboard
Google Analytics Dashboard for WP
Inactive User Deleter
Limit Login Attempts
Theme My Login
WP User Avatar
Does anyone know what plugin could be causing the problem if this isn’t a problem with BBpress?
I’ve already seen a couple threads but without much avail, I’m not running any plugins mentioned in that thread yet I still experience the problem after updating to WordPress 4.0
I’ve already reverted my wordpress installation as I can’t really put the forum out for more than a day, I’m running the following plugins on my site:
Adminimize
AdSense Click-Fraud Monitoring Plugin
amr shortcode any widget
BAW Login/Logout menu
bbPress
bbPress Custom CSS File
BulletProof Security
GD bbPress Tools
Google Adsense Dashboard
Google Analytics Dashboard for WP
Inactive User Deleter
Limit Login Attempts
Theme My Login
WP User Avatar
Does anyone know what plugin could be causing the problem if this isn’t a problem with BBpress?
thanks hugo…i added that code to the functions.php and that got the first topic to show within the sticky threads. Im still missing all my standard topics and and all replies. Is there a way to do that in the functions?
A written to the S2 member thread:
A better fix – on a copy of content-single-topic.php in a bbpress folder in the theme-
is to find the line:
<?php if ( bbp_show_lead_topic( ) ) : ?>
and change it to:
<?php if ( bbp_show_lead_topic( $show_lead = true ) ) : ?>
Even better than that is to write this as a filter run from functions.php probably until such time as a true reason and solution is provided.
This function added to your themes functions file should also achieve the same requirement and can be removed after things have been cleared up.
function show_bbp_lead_topic_true() {
$show_lead = true;
return $show_lead;
}
add_filter('bbp_show_lead_topic', 'show_bbp_lead_topic_true');
There is a hack suggested on the S2 member github thread that I would not advise using but if people do then modify a copy of the file not the core one!
The fix suggests circumventing the template part include in content-single-topic.php calling single-topic-lead.
@johnjamesjacoby
The issue appears to be – in S2 members case? that the conditional check on bbp_show_lead_topic() is returning false when it was returning true, why? not sure why at the moment.
Hi @stigolsen
What you should try :
(- read https://codex.bbpress.org/amending-bbpress-templates/ )
– create a folder named “bbpress” in your theme’s folder
– create a loop-forums.php file in it
– copy+paste the content linked in loop-forums.php (click the third button just above the first line of code in pastebin.com, then use Ctrl+C to copy)
– upload this new file in its new folder on your server
That should be OK. Be careful when you update your theme, the loop-forums.php may be deleted.
I’m newbie with wordpress, where can fix this?
View post on imgur.com
I search in all code, but I find no way to edit size of this bar
Hi,
Im a total newbie and I have the socute theme trying to integrate this code.
I have this “socute child theme” that holds the folders : cache, woocommerce and woocommerce_2.0x.
There are not wp-content/your-theme/bbpress/ in the child theme. So where should I put the file loop-forums.php?
In my socute original theme I find the loop-forums.php in the following folder: wp-content\plugins\bbpress\templates\default\bbpress
Should I remover this file from this place, edit it by removing everything that is already in that file and paste the code that you suggest? And where to put the file afterwards when I dont have the directories you are telling me about?
And one last question:
What should I do with the code written below “RAW Paste Data”?
I really appreciate if some of you please can help me with this total newbie questions. It will help me have a good start with learning this.
Thanks
All the best, Stig
I wish to merely change the color of my website and the font sizes.
Thank you.
I need to have the bbpress codes so I can search for them in my code and easily alter them. I have spent hours so far searching, in vain
Nevermind. I fixed it.
I placed the code on my child theme functions.php file rather stated on the guide on loop-single-forum.php.
Cheers! 🙂
Thanks Stephen @netweb for looking on to this.
I really wish I could say it fixed the issue apparently I’m still getting the same error. 🙁
( ! ) Fatal error: Cannot redeclare bbp_codex_remove_counts() (previously declared in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php:9) in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php on line 14
I’ve got the same problem all my topics are just gone but they are still there in the back end they’re just aren’t showing up in the front-end.
I only updated to 4.0 and other than BBpress I don’t have much other plugins installed here’s a list:
adminimize
adsense-click-fraud-monitoring
amr-shortcode-any-widget
baw-login-logout-menu
bbpress
bbpress-admin-bar-addition
bbpress-custom-css-file
bulletproof-security
google-adsense-dashboard-for-wp
google-analytics-dashboard-for-wp
inactive-user-deleter
limit-login-attempts
theme-my-login
wp-user-avatar
I do think it is a conflict with the code and the newer version of WordPress as I only updated wordpress to 4.0 and the errors started to appear.
Here are lines 1356 – 1395 of the said file in the error message:
/**
* Adds ability to include or exclude specific post_parent ID's
*
* @since bbPress (r2996)
*
* @global DB $wpdb
* @global WP $wp
* @param string $where
* @param WP_Query $object
* @return string
*/
function bbp_query_post_parent__in( $where, $object = '' ) {
global $wpdb, $wp;
// Noop if WP core supports this already
if ( in_array( 'post_parent__in', $wp->private_query_vars ) )
return $where;
// Bail if no object passed
if ( empty( $object ) )
return $where;
// Only 1 post_parent so return $where
if ( is_numeric( $object->query_vars['post_parent'] ) )
return $where;
// Including specific post_parent's
if ( ! empty( $object->query_vars['post_parent__in'] ) ) {
$ids = implode( ',', wp_parse_id_list( $object->query_vars['post_parent__in'] ) );
$where .= " AND {$wpdb->posts}.post_parent IN ($ids)";
// Excluding specific post_parent's
} elseif ( ! empty( $object->query_vars['post_parent__not_in'] ) ) {
$ids = implode( ',', wp_parse_id_list( $object->query_vars['post_parent__not_in'] ) );
$where .= " AND {$wpdb->posts}.post_parent NOT IN ($ids)";
}
// Return possibly modified $where
return $where;
}
Hey there everyone,
I’ve just registered to post this problem I’m currently experiencing which happens with the latest update of WordPress.
The boards all work however the threads and the post in the frontend are all gone, they’re actually still present in the backend of the wp-admin but on the actual site they can’t be seen anymore.
This only happened after the latest wordpress 4.0 update so I’m sure it has something to do with that.
Here is a link to my website: http://sg-carterpack.com/forum/
Thanks in advance for anyone who can assist me with fixing this as I sadly did not make a backup and the forum is our sites main focus so it’s really important for me to get this fixed asap!
MODERATOR EDIT: Here is a copy of your content from your other post below
I’ve already seen a couple threads but without much avail, I’m not running any plugins mentioned in that thread yet I still experience the problem after updating to WordPress 4.0
I’ve already reverted my wordpress installation as I can’t really put the forum out for more than a day, I’m running the following plugins on my site:
Adminimize
AdSense Click-Fraud Monitoring Plugin
amr shortcode any widget
BAW Login/Logout menu
bbPress
bbPress Custom CSS File
BulletProof Security
GD bbPress Tools
Google Adsense Dashboard
Google Analytics Dashboard for WP
Inactive User Deleter
Limit Login Attempts
Theme My Login
WP User Avatar
Does anyone know what plugin could be causing the problem if this isn’t a problem with BBpress?
I made a quick fix, I added this code into content_single_topic.php under bbpress/templates/default/bbpress
<?php echo "<div style=clear></div>"; ?>
<?php echo "<br />"; ?>
<?php bbp_topic_content(); ?>
just after
<?php else : ?>
<?php bbp_topic_tag_list(); ?>
<?php bbp_single_topic_description(); ?>
<?php if ( bbp_show_lead_topic() ) : ?>
<?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>
<?php endif; ?>
and before
<?php if ( bbp_has_replies() ) : ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php bbp_get_template_part( 'loop', 'replies' ); ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php endif; ?>
It shows the content, but it is not properly formatted.
Any other fixes?
All function names need to be unique:
See the WordPress Plugin Handbook for more details:
Sanity Practices
You can achieve this simple by prefixing the function names with your name: 🙂
function donalyza_remove_counts() {
$args['show_topic_count'] = false;
$args['show_reply_count'] = false;
$args['count_sep'] = '';
return $args;
}
add_filter('bbp_before_list_forums_parse_args', 'donalyza_remove_counts' );
Our codex articles will need to be updated to include prefixes so there are none of these conflict, suggestion might be bbp_codex_ so that way a hint is also given where the custom function may have originated from 😉
I was trying to follow the step by step guide to bbpress forum – part 3
I copied the the function below and add it on line 9 of loop-single-forum.php file.
function remove_counts() {
$args['show_topic_count'] = false;
$args['show_reply_count'] = false;
$args['count_sep'] = '';
return $args;
}
add_filter('bbp_before_list_forums_parse_args', 'remove_counts' );
Then I ran my forum site and got this error.. I’m doing this locally to test.
“Fatal error: Cannot redeclare remove_counts() (previously declared in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php:9) in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php on line 14“
ok i havent really messed with breadcrumbs that much i usually remove them but there suppose to show home > forums > forums i think from what i just tested on my localhost.
since it shows the root anyway if you are already on the forum archive.
but i did end up removing one of the forums link this weird way
ok i dont know for sure what i did because i was basically just fiddling around so here are all of what i did
i had this in my functions php in my own thematic child theme.
function mycustom_breadcrumb_options() {
// Home - default = true
$args['include_home'] = false;
// Forum root - default = true
$args['include_root'] = true;
// Current - default = true
$args['include_current'] = true;
return $args;
}
add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options');
add_filter( 'bbp_get_breadcrumb', 'change_breadcrumb_text' );
Function change_breadcrumb_text ($trail) {
$trail = str_replace ('No Labels Community Forum','N L C F',$trail) ;
return $trail ;
}
then i removed the add_filter line for the mycustom_breadcrumb function
so i have this now.
function mycustom_breadcrumb_options() {
// Home - default = true
$args['include_home'] = false;
// Forum root - default = true
$args['include_root'] = true;
// Current - default = true
$args['include_current'] = true;
return $args;
}
add_filter( 'bbp_get_breadcrumb', 'change_breadcrumb_text' );
Function change_breadcrumb_text ($trail) {
$trail = str_replace ('No Labels Community Forum','N L C F',$trail) ;
return $trail ;
}
this removed one of the NLCF links in the breadcrumbs.
i even removed the my custom breadcrumbs function and its still only shows one NLCF link…
its weird :/