Essential Grid

Forums › Forums › Search & Filter Pro › Essential Grid

Viewing 2 posts – 1 through 2 (of 2 total)
  • Anonymous
    #235253

    I see that a number of users have asked about integrating with Essential Grid, but the replies seem to be private. Can you send me instructions on how to output search results using Essential Grid.
    Thank you.

    Trevor
    #235279

    I think it would be like this:

    Let us assume that the ID # for our form is 12345, that the essential grid you have made has an alias name of my-essential-grid, and its ID # is 67890.

    On the page itself you might have code like this to output our form and the essential grid:

    [searchandfilter id="12345"]
    [ess_grid alias="my-essential-grid"]

    And below would the code added to your child theme functions.php file:

    add_filter('essgrid_query_caching', 'eg_stop_caching', 10, 2);
    add_filter('essgrid_get_posts', 'eg_mod_query', 10, 2);
     
    // turn off caching for your grid
    function eg_stop_caching($do_cache, $grid_id) {
    	if($grid_id == 67890) return false;
    	return true;
    }
     
    function eg_mod_query($query, $grid_id){
    	if($grid_id == 67890) {
    	//modify the essential grid query arguments
    	$query['search_filter_id'] = 12345; 
    	}
    	return $query;
    }

    In the form, the Ajax Container would likely need to be something like #esg-grid-67890-1-wrap. But … Essential Grid does a lot of changing of classes when Ajax is fired, so it is best to leave Ajax OFF for now, sorry.

    And the form set to Custom Display Results Method.

    Does that help? I have never done this myself, but this is my understanding of how to do it.

Viewing 2 posts – 1 through 2 (of 2 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.