Home Create WordPress Endpoints
Create WordPress Endpoints
January 13, 2016
I was building a wordpress plugin for use with Rand Group’s website and other clients. One of the features of this plugin is to provide a slug for displaying resources built from Download Monitor( shown below )
`
/[content-type]/[download-slug]
e.g.
/brochure/7-mistakes-in-software-integration
// this should be interpreted by wordpress like
/?brochure=7-mistakes-in-software-integration
`
WordPress provides functions to do this pretty easily. I list this steps below
- Identify your endpoints
- Add your endpoint
- Register a function to add query variables
- Provide a handler