Hey everyone.
I’ve been tweeting quite a bit recently about custom URL rewrites in WordPress. After a few hours of trial and error, I’ve managed to get my specific custom URL rewrites working. After reading through several tutorials online (the majority of which used the same examples to explain only a portion the information I was looking for), here’s my tutorial- a getting started guide to Custom URL rewrites in WordPress.
The process
So, what exactly are we doing here? To put things in point form, this is the process:
- Create custom rewrite rules
- Add our new variables to the public_query_vars array
- Flush (and thus, regenerate) all WordPress rewrite rules
- Add our functions from steps 1, 2 and 3 into WordPress via actions and filters
Right, so lets get down to it then. Continue reading