Wordpress - register URL variable
//Add an URL variable (such as `/?opened=true`, check if exists with `get_query_var('opened')`)
function add_query_vars_filter( $vars ){
$vars[] = "allevents";
// $vars[] = "my_var2";
return $vars;
}
add_filter( 'query_vars', 'add_query_vars_filter' );