- This topic has 1 reply, 3 voices, and was last updated 4 years, 9 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Essential Grid
Tagged: essential grid
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.
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.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy