JSON EndPoint Sample

Set Up Our Example

For our example, we have the highly critical task of creating a place to store our animated GIFs and provide an easy way to access the links from a third-party. We want to access this by passing in a tag and all we need to get back is the link to the gif and a short description of it. For this, we will create a new CPT with just the featured image and title and a non-hierarchical taxonomy.

Courtesy:

Create a Simple JSON Endpoint in WordPress