Bbpress Styles

Hello, I was wondering how I go about removing the changes that integrity is making to my BBpress forum.

Particularly how to add the search form back to a specific forum. Its currently only displaying in the root directory of all forums

Hello @avatar-computing,

Thanks for writing in!

Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

After the child theme is set up, please add the following code in your child theme’s functions.php file

// bbPress Search
// =============================================================================

if ( ! function_exists( 'x_bbpress_show_search_pagination' ) ) :
  function x_bbpress_show_search_pagination() {
    return true;
  }
endif; 

We would loved to know if this has work for you. Thank you.

Thank you for the fast reply @RueNel
Unfortunately that doesn’t have seemed to do the trick.
I tried it both in the primary and child theme functions.php files, any idea’s?

Hi @avatar-computing,

May I know which search form you’re currently referring? As far as bBpress integration, there are only a few lines added through the theme, then just some templates. The code provided above is for pagination which is related to the search.

I also tried it on the TwentySeventeen theme and I’m not sure if I’m looking to the correct section as there is no search. Maybe I overlooked it since I’m not fully familiar with how bBpress works, the integration between the two is just for design.

Screenshots will be helpful :slight_smile:

Thanks!

Certainly, so currently the search bar only shows in the root of the forums.

How ever when you are on an individual form the search option is gone

But with a different theme it shows be default on those forums

Hello @Avatar-Computing,

I have looked into this and I found out that by default, the search form is only in the the forum index. There is no search form in the single forum pages. The other theme that you have tested has a custom template which is why it has a search form. You can also do that in X or Pro theme. To do that, assuming that you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

/**
 * Single Forum Content Part
 *
 * @package bbPress
 * @subpackage Theme
 */

?>

<div id="bbpress-forums">

	<?php if ( bbp_allow_search() ) : ?>

		<div class="bbp-search-form">

			<?php bbp_get_template_part( 'form', 'search' ); ?>

		</div>

	<?php endif; ?>

	<?php bbp_breadcrumb(); ?>

	<?php do_action( 'bbp_template_before_single_forum' ); ?>

	<?php if ( post_password_required() ) : ?>

		<?php bbp_get_template_part( 'form', 'protected' ); ?>

	<?php else : ?>

		<?php bbp_single_forum_description(); ?>

		<?php if ( bbp_has_forums() ) : ?>

			<?php bbp_get_template_part( 'loop', 'forums' ); ?>

		<?php endif; ?>

		<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>

			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>

			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>

			<?php bbp_get_template_part( 'form',       'topic'     ); ?>

		<?php elseif ( !bbp_is_forum_category() ) : ?>

			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>

			<?php bbp_get_template_part( 'form',       'topic'     ); ?>

		<?php endif; ?>

	<?php endif; ?>

	<?php do_action( 'bbp_template_after_single_forum' ); ?>

</div>


3] Save the file named as content-single-forum.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/bbpress/ or wp-content/themes/pro-child/bbpress/ if you are using Pro theme.

We would loved to know if this has work for you. Thank you.

@RueNel You are a master of what you do friend. Thank you for the detailed response I know this is a little outside the scope of support you guys typically offer for support but it is very much appreciated. I will give this a try first thing tomorrow but that looks promising.

I was curious as to how to about about a custom template for the BBPress forum inside pro if all else failed, I should be able to run with this

Hello @avatar-computing,

I can guarantee that the solution I gave will not fail. I have tested it first in my local installation before giving it to you.

Please let us know how it goes.

Worked like a charm. Thanks again!

You’re welcome!
Thanks for letting us know that it has worked for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.