Skip to:
Content
Pages
Categories
Search
Top
Bottom

search shows results with and without sidebar


  • ericgf
    Participant

    @ericgf

    When I perform a search, I get duplicate search results.

    One set of results have no sidebar (full page width) and immediately below that I get a duplicate set of search results with the sidebar widgets. I am using a bbpress.php file in my child theme. It appears to be using that.

    Here is my bbpress.php file:

    <?php
    /* Template Name: Page: bbpress.php */
    
    global $data;
    
    get_header(); ?>
    
    <div class="page-wrap">
    
    <?php get_template_part( 'framework/inc/slider' ); ?>
    <div id="page-body" class="page-body">
        
        <div class="container">
    				
    		<div id="page-title">
    		<hgroup>
    		   <h2>Fax Software</h2>
    		   <h1>Community Forums</h1>
                    </hgroup>
    		</div>
    			
    		<?php if ( function_exists('yoast_breadcrumb') ) 
                 {yoast_breadcrumb('<p id="breadcrumbs">','</p>');} ?>
    
    		<?php echo do_shortcode( '[bbp-search]' ) ?>  
    				
    		<div class="row">
    			<div class="span9"> 
    						
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    					<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>><?php
    						the_content();
    						wp_link_pages(array('before' => 'Pages: ', 'next_or_number' => 'number')); ?>
    					</article><?php
    					if(!$data['check_disablecomments']) {
    						comments_template();
    					}
      				endwhile; endif; ?> 
    			</div>
     			<?php get_sidebar('forums'); ?>    
    			 
    		</div>
    	</div>
    	
    </div>
    <?php get_footer(); ?>

    I do not currently have a loop-search.php file in my child theme.

Viewing 1 replies (of 1 total)

  • ericgf
    Participant

    @ericgf

    I was able to resolve the issue by adding a conditional statement to check for bbpress search results using bbp_is_search_results(). The theme i’m using doesn’t play well with bbPress

    <?php if ( !bbp_is_search_results() ) : ?>	
        
       <?php endif;?>	
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar