Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress on a custom block theme, with dark mode and blog sync

  • @salvatorenoschese

    Participant

    I’ve just launched a small forum on my personal blog (custom block theme with light/dark mode), using bbPress plus one small mu-plugin, with no other add-ons: salvatorenoschese.it/community

    I know forums aren’t exactly trendy anymore, and most conversations have moved to social networks and chat apps. But I still think they have real value: discussions stay organised, searchable and open to everyone, instead of getting lost in a feed or locked inside a group chat.

    A few notes in case they help someone:

    • Templates. Out of the box the forum pages didn’t display properly with my block theme: WordPress picked the wrong template and showed excerpts or the wrong content. Making bbPress pages use the theme’s full-width page template, and letting the Post Content block print bbPress’s own output, fixed it.
    • Dark mode. bbpress.css uses fixed light colours, so I added a small stylesheet that maps them to the theme’s colour variables. It loads only on forum pages, and bbPress’s CSS isn’t loaded anywhere else.
    • Roles. Because of some unusual roles on my install, my admin account didn’t have the Keymaster forum role. Assigning it manually fixed it.
    • Login. Logging out from the dashboard returned an error because bbPress’s logout filter conflicted with my custom login URL, so I removed that filter. I also replaced bbPress’s login form with links to the standard WordPress login, so all logins go through a single protected form.
    • Profiles. The bio field stripped most HTML. I now display it with the same HTML WordPress allows elsewhere.
    • Blog ↔ forum. Each blog post automatically gets a closed “showcase” topic in a dedicated forum, with the excerpt, a link to the post and the comment count, while comments stay on the blog. Title, tags and status stay in sync.
    • Stats. Instead of [bbp-stats], I built a small custom box at the bottom of the forum index. It shows topics, replies, members and the latest activity, leaves out the blog-posts forum, and only appears once there’s at least one real discussion.
    • Small things. Hover effects on mobile, the “Insert link” popup in dark mode, and cache purging (LiteSpeed) needed a few tweaks.

    Overall, bbPress works well with block themes once the template part is sorted out. Thanks to the bbPress team for keeping it going!

  • You must be logged in to reply to this topic.
Skip to toolbar