Add Widget In bbPress

In this post, i’ll give you the PHP code you can simply paste at the end of your child themes functions file.

The 1st code snippet produces a new widget area which only displays if you have bbpress installed with Genesis.

The 2nd snippet works with any theme as it uses a WordPress hook.

1. Genesis

Please copy the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++

You can change the hook position in Genesis.

2. Any Theme

bbPress Conditional Tags

is_bbpress()

Archive

bbp_is_forum_archive()
bbp_is_topic_archive()

Topic Tags

bbp_is_topic_tag()
bbp_is_topic_tag_edit()

Component

bbp_is_single_forum()
bbp_is_single_topic()
bbp_is_single_reply()
bbp_is_topic_edit()
bbp_is_topic_merge()
bbp_is_topic_split()
bbp_is_reply_edit()
bbp_is_reply_move()
bbp_is_single_view()

User

bbp_is_single_user_edit()
bbp_is_single_user()
bbp_is_user_home()
bbp_is_user_home_edit()
bbp_is_topics_created()
bbp_is_replies_created()
bbp_is_favorites()
bbp_is_subscriptions()

Search

bbp_is_search()
bbp_is_search_results()


Comments

2 responses to “Add Widget In bbPress”

  1. Palve Avatar

    I was so stressed out trying to figure out how to add widgets to bbPress.

    Thanks to Brad and this incredibly useful site, I managed to find a way.

    Thanks so much Brad!

    1. Brad Dalton Avatar
      Brad Dalton

      You’re welcome Palve.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.