Forums Forums Search & Filter Pro Display results using The Grid plugin as template

Viewing 3 posts - 1 through 3 (of 3 total)
  • Trevor
    #223406

    Ajax results refreshing is quite hard to set up. Does it work OK with Ajajx OFF?

    Which display Results method are you using, and is the template being applied to a specific page (as many of our Display Results Methods need to use a defined results URL), as I was thinking whether it might work in Custom mode, with this extra shortcode:

    echo do_shortcode('[searchandfilter id="32129" action="filter_next_query"]');

    Placed just before this line:

    The_Grid('Posts_archive', true)

    Anonymous
    #223444

    Thanks Trevor,

    Turning AJAX off solves the issue.

    What am I losing by turning it off? The pagination function? (it is not much of a big deal as searches do not display that many results on my website).

    To answer your question I am using the Archive Mode to display results.

    For your information (and to improve my knowledge) I tried to implement your suggestion in Custom Mode.

    I created a Searches page which I based upon a new page-searches.php template containing the following code:

    <?php /* Template Name: page-searches */
    get_header(); ?>
    		<main id="main" class="site-main single-page" role="main">
    		<?php 
    		echo do_shortcode('[searchandfilter id="32129" action="filter_next_query"]');
    		The_Grid('Posts_archive', true); // where true is for template mode
    		if ( have_posts() ) : ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    			<?php endwhile; ?>
    
    		<?php endif; ?>
    		</main><!-- #main -->
    <?php get_footer(); ?>

    I then linked the S&F form to this Searches page url. But when I do a search with this S&F form the Searches page does not display any post (same when I try to use the standard loop of my theme, not The Grid shortcode).

    Is there something I didn’t understand about Custom Mode?

    Thanks.

    Nicolas

    Trevor
    #223497

    Not at all. The Custom mode tends to get used when all else fails, usually (as in your case) when some non-standard code is being used to create the ‘results grid’. If you had been lucky, it would have worked as specified, but it did not. What you lose keeping it as it was, but with Ajax OFF, is the page will reload between searches, rather than just the results fading in and out.

Viewing 3 posts - 1 through 3 (of 3 total)