Forums › Forums › Search & Filter Pro › How to filter years?
- This topic has 16 replies, 2 voices, and was last updated 6 years, 2 months ago by
Trevor.
-
Trevor(Private) September 13, 2019 at 11:31 am #220940
I think I understand your question now. I think a problem between us of language and translation.
You wish to know how to present the results with different style, layout and appearance, yes?
What do you want them to look like, do you have an example I can see?
Trevor(Private) September 19, 2019 at 4:51 pm #221376Those examples are using Essential Grid plugin?
For now, we do not support the Essential Grid plugin. However, I think Essential Grid has a hook we can use.
So, first remove the filter_next_query shortcode from the page:
https://www.screencast.com/t/5mIXvD4Ik4p2
Your Essential grid is ID 83 (I do not think this method can use the alias).
The Search & Filter Form ID is 7997This code can be added to your (child) theme’s 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 == 83) return false; return true; } function eg_mod_query($query, $grid_id){ if($grid_id == 83) { $query['search_filter_id'] = '7997'; } return $query; }I cannot be sure that this is correct, but I think it is.
-
AuthorPosts