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

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Noeste IJver
    #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 Moderator
    #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.

    Noeste IJver
    #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 Moderator
    #193397

    How about a quick test using the shortcode method?

    Noeste IJver
    #193399

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

    Trevor Moderator
    #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.

    Noeste IJver
    #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)

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