Okay
  Public Ticket #3802529
URL variable to set filters?
Open

Comments

  •  2
    elduco started the conversation

    Is there a way to include filter variables in the url?  

    For example, our if main calendar has the url /schedule/, is there a way to set the location filter on load to a specific filter, based on a url variable?  eg /schedule/?filter_location=4

  •  897
    Zhivko replied

    Sure, try this hook:

    add_filter('stec_shortcode_atts', function ($atts) {
    
        if (get_query_var('pagename') === 'schedule') {
            $atts['filter__location'] = 4;
        }
    
        return $atts;
    });

    Stachethemes Developer