Rewrite URL to plugin file
You can always check the value of the result with the function var_dump as follows: var_dump( $matches[1] ); In this case, I think is returning an Array with the results you should try to out. <?php echo $matches[1][0] ; ?>