[Plugin: WP MVC] pretty URLs
-
I’m developing a WP MVC based project currently.
I’d really like to be able to use pretty URLs that don’t include the ID… something like
https://<hostname>/performers/roy-janik
rather than
https://<hostname>/performers/65/roy-janik
I have a route defined as
MvcRouter::public_connect(‘performers/{:name:[a-zA-Z]+-[a-zA-Z]+}.*’, array(‘controller’ => ‘performers’, ‘action’ => ‘show’));So far I haven’t had any luck.
If I throw debugging statements into the core, I can see that at some point name is indeed getting set to roy-janik, but the time the show() method of the performers controller is getting called, the params array is empty.
Is there a way to do what I want, or do you always have to have the id in the URL?
- The topic ‘[Plugin: WP MVC] pretty URLs’ is closed to new replies.