How can I check if I am on a forum page or forum post inside my theme. I am using the bbpress plugin (not standalone bbpress). There should be some conditional like is_bbpress() or something?
Leave a Reply
You must be logged in to post a comment.
How can I check if I am on a forum page or forum post inside my theme. I am using the bbpress plugin (not standalone bbpress). There should be some conditional like is_bbpress() or something?
You must be logged in to post a comment.
Indeed, there is a function named
is_bbpress()
. Use the RC1 version, it was introduced in r3344.This page explains the is_bbpress() function. http://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template
It also details another way which involves creating a new template which matches one of the key names for example forum.php. Than all forum pages will be loaded with that template rather than page.php, meaning you don’t have to use is_bbpress() to test if it’s a forum page anymore.