Hi,
I am having problems setting up the forum for my community.
I have used the short code [bbp-forum-index] on the “forum” page but nothing appears on the screen, it is blank.
The subscription I take for my website is on wordpress.com and I’ve seen a few tutorials on how to setup the bbPress but had no success. It seems others on the internet have more options on wordpress than my subscription on wordpress.com, hope this helps to figure out.
I hope to get this done.
Cheers and waiting for a reply,
André Machado
Hello,
The website is up to date (WP 5.9 and 2.6.9 for bbpress)
I experience a randomly error on a website I manage. When you click on the answers in the backoffice you experience several times the same error, a white page with an error 500 and a fatal error :
WP_Fatal_Error_Handler->handle
WP_Fatal_Error_Handler->display_error_template
WP_Fatal_Error_Handler->display_default_error_template
wp_die
and
WP_Fatal_Error_Handler->handle()
[PHP Kernel]
WP_Fatal_Error_Handler->display_error_template(Array, WP_Error)
./wp-includes/class-wp-fatal-error-handler.php:57
WP_Fatal_Error_Handler->display_default_error_template(Array, WP_Error)
./wp-includes/class-wp-fatal-error-handler.php:152
wp_die(WP_Error, <code></code>, Array)
./wp-includes/class-wp-fatal-error-handler.php:233
Could you help please ?
Thank you.
Valérie
Put this in the custom css part of your theme
#bbpress-forums #bbp-user-wrapper h2.entry-title {
display: none;
}
I’ve just taken a look.
bbpress uses the wordpress ‘untrash’ function to restore topics and replies.
That wordpress function includes a note saying
* By default posts that are restored will be assigned a status of 'draft'.
* Prior to WordPress 5.6.0, restored posts were always assigned their original status.
so this was a change in WordPress 5.6
However WordPress helpfully includes a hook we can link to to restore the previous status automatically
add_filter ('wp_untrash_post_status', 'wp_untrash_post_set_previous_status' , 10 , 3) ;
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
@spanky11, as Robin clarified in his reply to my request, I had quite a few links buried in the code I pasted (which was an oversight on my part)…and that explained why the post was held for moderation.
If you’ve confirmed the link count (under 3), perhaps making a direct appeal to the mod like I did should suffice?
Robin had released my post even before I logged my request / (complaint?) 🙂 They’re human and will certainly understand if the (perceived) violation wasn’t committed with maliciousness 🙂
certainly, it is:
add_filter( 'generate_get_the_title_parameters', function( $params ){
if ( bbp_is_forum_archive() ) {
$params = array(
'before' => sprintf(
'<h2 class="entry-title"%s">',
'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
),
'after' => '</h2>',
);
}
return $params;
},10,1 );
ok so something like
add_filter ('generate_get_the_title_parameters' , 'rew_community', 10 , 1) ;
function rew_community ($params) {
if (is_page ('community')) {
$params = array(
'before' => sprintf(
'<h2 class="entry-title"%2$s><a href="%1$s" rel="bookmark">',
esc_url( get_page_by_title( 'community' ) ) ),
'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
),
'after' => '</a></h2>',
);
}
return $params ;
}
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
Method 2
WP Page: Named Community
Slug Name: Community
Code within the page: [bbp-forum-index]
also, I forgot to include the function, here’s the full code that calls the issue:
function generate_get_the_title_parameters() {
if ( ! is_singular() ) {
$params = array(
'before' => sprintf(
'<h2 class="entry-title"%2$s><a href="%1$s" rel="bookmark">',
esc_url( get_permalink() ),
'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
),
'after' => '</a></h2>',
);
}
return apply_filters( 'generate_get_the_title_parameters', $params );
}
ok, so which method in
Step by step guide to setting up a bbPress forum – Part 1
item 3
are you using to display this page?
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
add_filter ('bbp_get_caps_for_role' , 'rew_change_caps', 10 , 2) ;
function rew_change_caps ($caps, $role) {
// Which role are we looking for?
switch ( $role ) {
case bbp_get_spectator_role() :
$caps = array(
// Primary caps
'spectate' => true,
'participate' => true,
// Forum caps
'read_private_forums' => true,
// Topic caps
'publish_topics' => true,
'edit_topics' => true,
// Reply caps
'publish_replies' => true,
'edit_replies' => true,
// Topic tag caps
'assign_topic_tags' => true,
);
break;
}
return $caps ;
}
Thank you for that Robin, I was able to find it in the theme coding based on your assistance.
if ( ! is_singular() ) {
$params = array(
'before' => sprintf(
'<h2 class="entry-title"%2$s><a href="%1$s" rel="bookmark">',
esc_url( get_permalink() ),
'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
),
'after' => '</a></h2>',
);
}
Do you know how I could exclude the forum link from this?
ok this is theme/page/wordpress setup rather than bbpress – if you look at the HTML then bbpress starts below this with
<div id="bbpress-forums" class="bbpress-wrapper">
above this – it is not bbpress doing it.
Thanks. I added it underneath the existing code and purged my cache but no difference. So I took the code out again.
Any other thoughts?
sorry, my brain was being fried – Visual is not standard but text is.
bbpress 2.6.7 and after has a bug
try and add this fix to your functions file
if( !function_exists( 'bbpress_browser_supports_js' ) ){
function bbpress_browser_supports_js() {
echo '<script>document.body.classList.remove("no-js");</script>';
}
add_action( 'wp_footer', 'bbpress_browser_supports_js' );
}
Thats a long story @robin-w.
I use “Advanced Editor Tools” to the main TinyMCE tool bar.
I have my own plugin that adds a couple of tweaks to the toolbar.
I have TinyMCE Config but that is for the TinyMCE behaviour.
I think I have some custom hooks too.
// ==============================================================
// Tweak MCE Toolbars (bbPress Editor)
function ajt_enable_visual_editor( $args = array() ) {
global $bsp_style_settings_form ;
$args['tinymce'] = true;
$args['teeny'] = false;
if ($bsp_style_settings_form['Show_editorsactivate'] == 1) $args['quicktags'] = false;
return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'ajt_enable_visual_editor' );
// ==============================================================
@robin I am experiencing the exact same issue, even when using ?ao_noptimize=1
to shut off Autoptimize for testing.
I also use GeneratePress (pro), and bbpress with bbpstylepack .
The individual forums show perfectly, but the index is very broken and missing proper styling.
The issue can be seen here https://www.budget101.com/community/
ok, it is a function in your child theme’s function file – line 28
Call to undefined function is_bbpress() in /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi-Child-Theme/functions.php:28
So who had created that file? as either they or you will need to amend whatever that part of the file is trying to do.
Good morning,
In my forum they have the same capability but the Name group of two i needed. The forum is only one Part of my site.
Did you have an idea for the Code?
Thanks a lot
Hello,
I need that the spectator had the same capabilitys as a Participant.
Can anybody give a code for my functions.php
That were great.
Sorry for my English. I´m from Germany.
Regards
Hi!
To anyone in need of a login menu item with both user avatar and Link to the Bbpress dashboard in 2022, here’s my version of @robkk ‘s code :
add_filter('wp_nav_menu_items','rk_bbp_menu_profile_link', 10, 2);
function rk_bbp_menu_profile_link( $items, $args ) {
if( is_user_logged_in() && $args->theme_location == 'menu-1') {
$current_user = wp_get_current_user();
$user = $current_user->user_login ;
$avatar = get_avatar( $current_user->ID, 64 );
$items .= '<li class="NavBarLogin"><a href="/forums/users/' . $user . '/edit">' . $avatar . 'Mon compte</a></li>';
}
return $items;
}
I’ve got BuddyPress set up so that each group has one bbPress forum. I’d like to show a ‘Subscribe’ button in the group header on the group’s homepage which works exactly the same as the Subscribe button on the group’s forum page.
I’m using the code below to show the button, but it reloads the page instead of doing an AJAX call, and it doesn’t subscribe/unsubscribe the user from the group’s forum.
What do I need to do to get this working? The correct forum ID is being passed in the arguments.
$forum_ids = bbp_get_group_forum_ids();
if ( $forum_ids ) {
$sub_link_args = [ 'object_id' => reset( $forum_ids ) ];
bbp_forum_subscription_link( $sub_link_args );
}
I’ve enabled the full text editor, but it doesn’t use the editor styles I’ve created for the admin area.
Adding this:
add_filter( 'bbp_before_get_the_content_parse_args', 'u3aBBPEditorStylesheet' );
function u3aBBPEditorStylesheet( $args ) {
$args['tinymce'] = array( 'content-css' => get_stylesheet_directory_uri() . '/css/bothEditorStyles.css');
return $args;
);
replaces the editor with the HTML one. In the above setting $args[‘tinymce’] back to true brings the full text editor back. Any idea what I’m doing wrong?
Andy
Wait what…Version 1 ?! oh my! (facepalm)!
Thanks, Robin, for this. I’ll update bbpress on my site and run the code you’ve provided.
merci!