Support Forums

There is a new way to get support - via the support tab in your account.

Our support systems are changing, for the better. You'll be able to manage all your support requests from your account, and respond to any tickets via email.

These support forums are now closed - existing tickets will be closed after a month.

Forums Forums Search & Filter Pro Unwanted reset on no results


Viewing 7 posts - 1 through 7 (of 7 total)
  • Noeste IJver


    I’ve got a form on this page:

    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 Moderator

    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.

    Noeste IJver

    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">
    			<?php echo do_shortcode('[searchandfilter slug="aanbod"]'); ?>
    	<?php if ( have_posts() ) : ?>
    		<div class="row overzicht-aanbod" id="aanbod-results">
    				while ( have_posts() ) : the_post();
    					echo get_the_title();
    	<?php else : ?>
    		<div class="row overzicht-aanbod" id="aanbod-no-results">
    			<div class="col-xs-12">
    				<p>Geen inhoud.</p>
    	<?php endif; ?>
    <?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 Moderator

    How about a quick test using the shortcode method?

    Noeste IJver

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

    Trevor Moderator

    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.

    Noeste IJver

    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)

The topic ‘Unwanted reset on no results’ is closed to new replies.