You’ll need to append the new variable (param1
) to the public query variables:
add_filter("query_vars", function( $vars ){
$vars[] = 'param1';
return $vars;
});
Now you’ll be able to get the value of this param with get_query_var( 'param1' )
.