WordPress URL Routing

I’m using an external api to populate an article page in wordpress.

Right now I’m having to use a url fragment to define the slug and load a specific article like this.

Read More

http://example.com/article#some-api-story-slug

I need the slug to be the last path component

http://example.com/article/some-api-story-slug

Is it possible to accomplish this without the use of Redirects

The ideal solution would be to intercept the last part of the route as a wildcard and pass it along to a page template, like you can do with most other framework, but I haven’t had much luck finding a similar solution for WordPress.

Any advice would be greatly appreciated.

Related posts

Leave a Reply