Skip to:

Forum Replies Created

Viewing 1 replies (of 1 total)

  • tobylewis


    I wrote my own theme and am always trying to do things the right way but initially things were not working correctly with bbPress or BuddyPress. I now realise was my theme using the_excerpt rather than the_content on the special pages.

    I’d read the topics in the buddypress codex on theme support but these mainly addressed the issue of altering pages using the template selection rather then explaining what a theme author needs to do to make their theme work properly with bbPress or BuddyPress. Just explaining how it injects its content into pages (by hooking the_content) is not immediately obvious to the newcomer.

    In my theme I had been using is_singular() to know when to show content rather then expert and use parameterised preferences for each post type for when is_singluar() was false.

    Simply changing this test to (is_singular() || is_page()) suddenly turned my theme from incompatible to reasonably compatible. The “/forums” slug still did not work properly but after searching around I discovered the is_bbPress() function and expanded the test to:

    (is_singular() || is_page() || (function_exists(‘is_bbPress’) && is_bbPress()))

    There may be other tricks and gotchas I haven’t found yet, but as I say it would be really nice to have a topic directed specifically at theme authors to make sure they know what needs to be in place to make things work.

Viewing 1 replies (of 1 total)
Skip to toolbar