This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.


bbpress forum search doesn't work

  • Creator
  • #14223

    I have bbpress forum and search doesn’t work. If I switch to theme that comes with wordpress, search finds the words.
    My forum is here:
    I have searched on internet for this problem, and other people have this problem too but on other themes…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #14227
    Jason Bobich


    The reason for this is because the theme uses a file called content-search.php to display when there are no search results found. The problem though is that bbPress has a template system setup where it uses a file with the same name, and allows you to override the plugin by putting the files in your theme. So, bbPress is taking this file of the theme with the same name and using it in place of its own.

    Anyway, with a little customization from your child theme, we can get things to work right. In your child theme, create a folder called “bbpress” and then inside make a new file called content-search.php. And in this file, just paste in from bbPress’s version of the file:

     * Search Content Part
     * @package bbPress
     * @subpackage Theme
    <div id="bbpress-forums">
    	<?php bbp_breadcrumb(); ?>
    	<?php bbp_set_query_name( bbp_get_search_rewrite_id() ); ?>
    	<?php do_action( 'bbp_template_before_search' ); ?>
    	<?php if ( bbp_has_search_results() ) : ?>
    		 <?php bbp_get_template_part( 'pagination', 'search' ); ?>
    		 <?php bbp_get_template_part( 'loop',       'search' ); ?>
    		 <?php bbp_get_template_part( 'pagination', 'search' ); ?>
    	<?php elseif ( bbp_get_search_terms() ) : ?>
    		 <?php bbp_get_template_part( 'feedback',   'no-search' ); ?>
    	<?php else : ?>
    		<?php bbp_get_template_part( 'form', 'search' ); ?>
    	<?php endif; ?>
    	<?php do_action( 'bbp_template_after_search_results' ); ?>

    Thanks for a quick answer! The search is working. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.