Forums Forums Search & Filter Pro How to filter years?

Viewing 6 posts - 11 through 16 (of 16 total)
  • Anonymous
    #220708

    Hi. How could I choose how to display results page?
    thx

    Trevor
    #220786
    This reply has been marked as private.
    Anonymous
    #220838
    This reply has been marked as private.
    Trevor
    #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?

    Anonymous
    #221318

    Yes, this is exactly I mean.

    Here you can see an example:
    example 1

    And another:
    example 2

    thx

    Trevor
    #221376

    Those 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 7997

    This 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.

Viewing 6 posts - 11 through 16 (of 16 total)