Site icon Hip-Hop Website Design and Development

get a URL parameter from a URL with get_query_var?

I’m making an attempt to get a customized URL parameter from a URL in WordPress.

I add the next code to features.php:

operate add_query_vars_filter( $vars ){
    $vars[] = "token";
    return $vars;
}
add_filter( 'query_vars', 'add_query_vars_filter' );

Then on the webpage I write:

<?php  $token = get_query_var( 'token', $default = '');  ?>
<h1>At the moment Looking token <?php echo (int) $token; ?> On a 
static entrance web page</h1>

and go to the webpage http://www.negovista.com/tokensuccess/?token=xxxxxx

Nevertheless on the web page is just printed

‘At the moment Looking token On a static entrance web page’ with out the xxxxxx

Anybody is aware of if there may be an error within the code?