I thought I should share this little wordpress plugin with you. Get it from wordpress.org here
What should I use it for?
- XHR (AJAX-requests). When you don’t want to use wp_ajax-hook.
- When you’re creating a RESTFUL API or something similar
- When you just want a custom url with a custom behavior.
How it works
Let’s get down to business. It will only take you a couple of minutes.
- Install and activate the plugin.
- Activate permalinks (everything else than default is fine)
- Go to “yourblog.com/hello_world” and follow the instructions there.
Just include your custom urls into the array
$eur_urls like this:
$eur_urls = array( "my-cool-url" => "my/absolute/path/to/my/cool/file.php" );
Include this wherever you want – but suitable places would be in your theme’s
functions.php or in your
Stuff that ain’t that awesome
It doesn’t support any wildcard or anything like that. No regular expressions. You can only use static urls. In the next version I will include an update so you can use urls like “posts/*”.
Fork it on github
Or give me some feedback! https://github.com/blmstr/easy-url-rewrite