Unwanted reset on no results

Forums › Forums › Search & Filter Pro › Unwanted reset on no results

Tagged: 

Viewing 7 posts – 1 through 7 (of 7 total)
  • Anonymous
    #193376

    Hi,

    I’ve got a form on this page: http://noesteprojecten.nl/lumenswerkt/aanbod/

    I’m noticing that the form seems to reset when there shouldn’t be any results. Per example: if I use the search box and type something like ‘fgsdafegre’, no results should be shown. Instead, ALL results are shown.

    However, it’s not possible to use the other filters anymore, looks like they’ve been updated with the correct results. Also, when refreshing the page, no results are shown (as should be the case).

    I don’t understand what’s causing this problem, any help would be greatly appreciated.

    Trevor
    #193383

    As you are using the Post Type archive method, this will be using the theme template file for that post type, and this behavior must be a result of how that template is coded.

    Anonymous
    #193387

    Hi Trevor,

    I’ve almost completely stripped the theme to find out what could cause the problem, but even when the code for the page is just this, the problem surfaces:

    <?php wp_head(); ?>
    
    <div class="container">
    
    	<div class="row">
    		<div class="col-xs-12">
    			<h3>Filters</h3>
    			<?php echo do_shortcode('[searchandfilter slug="aanbod"]'); ?>
    		</div>
    	</div>
    
    	<?php if ( have_posts() ) : ?>
    		<div class="row overzicht-aanbod" id="aanbod-results">
    			<?php
    				while ( have_posts() ) : the_post();
    					echo get_the_title();
    				endwhile;
    			?>
    		</div>
    	<?php else : ?>
    		<div class="row overzicht-aanbod" id="aanbod-no-results">
    			<div class="col-xs-12">
    				<p>Geen inhoud.</p>
    			</div>
    		</div>
    	<?php endif; ?>
    </div>
    
    <?php wp_footer(); ?>

    I’ve also disabled all plugins except for Search & Filter itself, but to no avail. I can’t switch to another theme as the used post type and taxonomies are built-in in the theme.

    For now I think there’s some problem with S&F settings or a bug in the plugin.

    Trevor
    #193397

    How about a quick test using the shortcode method?

    Anonymous
    #193399

    When using the shortcode method it seems to work like intended. What does that say?

    Trevor
    #193403

    Then it has to be something in the core of the theme that does this. It must look for a no results situation and redirect.

    Anonymous
    #193411

    OK, since our company didn’t create this theme and it’s going to be renewed in a while, we’re going to rewrite some things so we can use the shortcode way.

    Usually I would like to know what the exact problem is, but for this project I’ve got no time to figure that out.

Viewing 7 posts – 1 through 7 (of 7 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.