Forums › Forums › Search & Filter Pro › Essential Grid
Tagged: essential grid
- This topic has 1 reply, 3 voices, and was last updated 6 years, 7 months ago by
Trevor.
-
Trevor(Private) March 2, 2020 at 9:59 am #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 ofmy-essential-grid, and its ID # is67890.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
CustomDisplay Results Method.Does that help? I have never done this myself, but this is my understanding of how to do it.
-
AuthorPosts