Opened 2 years ago
Last modified 18 months ago
#3487 new defect (bug)
bbPress block theme support
Reported by: | mikachan | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | major | Version: | 2.6.9 |
Component: | Appearance - Theme Compatibility | Keywords: | has-patch needs-testing |
Cc: |
Description
bbPress doesn't seem to currently support block themes. When testing with Twenty Twenty-Three and Twenty Twenty-Two, bbPress pages render a WSOD.
I believe it's related to the index.php file that's included with the theme, as it looks like it's possible to (sort of) fix some of the pages by including the following in this file:
wp_head(); block_header_area(); block_template_part( 'page-inner' ); wp_footer(); block_footer_area();
There is a related discussion in the support forums: https://bbpress.org/forums/topic/template-in-block-themes/
There is also a similar ticket for the BuddyPress plugin, which seemed to be related to the index.php file as well. I'm not sure if it helps as I can't find any similar logic in bbPress, but here's the ticket: https://buddypress.trac.wordpress.org/ticket/8474#comment:31
(Apologies if this has already been reported, I couldn't find a related issue.)
Change History (7)
This ticket was mentioned in PR #7 on bbpress/bbPress by @mikachan.
2 years ago
#2
- Keywords has-patch added
This PR tries out adding support for block themes.
It checks if the current theme supports block-templates
, and if so, uses the template-canvas.php
as the main template.
This solution is based on this comment.
To test, try enabling bbPress with the Twenty Twenty-Two or Twenty Twenty-Three themes. Without this PR, the forum pages will not render. With this PR, they should render correctly.
Trac ticket: https://bbpress.trac.wordpress.org/ticket/3487
#5
@
18 months ago
I have checked your pull request on Github and tested the code. The code worked perfectly. Please add an extra * at the beginning of the comment.
That is
/**
Instead of
/*
Just to maintain consistency with the other comments.
#6
@
18 months ago
@arafatjamil01 thanks, I'm working on a new bbpress.php template that will work properly with FSE themes.
I plan to release this within my bbp-style-pack plugin in a week or so
@mikachan commented on PR #7:
18 months ago
#7
Thanks for the review, @arafatjamil01!
I've fixed up the comment formatting so it's consistent with the other comments in the file.
add_filter( 'template_include', 'bsp_twenty_twentytwo') ;
function bsp_twenty_twentytwo ( $template ) {
}