Used a “call center” as an example of using WP REST API to solve custom data problems with WordPress.
- What problem does it solve?
- The WP Rest API provides endpoints for data types taht allow devs to interact with sites remotely
How would I solve issues?
- shortcodes, used to hide code in a little bit of text
- hook to init on a certain set of pages
Create a route
- Pretty Permalinks
- serve up json of all posts
- Post endpoints
- Such as latest ten posts
- Anytime someone hits and end point… do something.
- Allow WP to watch for data to hit a url
- If it doesn’t recieve what it expects it will ignore it and move on.
- Keep it simple to accomplish your goals with the data
- Create a custom array of whatever you want
- If you build custom features don’t tie it to a theme. Consider using a “core functions plugins
- Chrome extension – JSON formatter – makes it human readable.
- Postman – Testing your API
- Learn More – https://developer.wordpress.org/rest-api