in WordPress

Create Your Own WordPress Rest Endpoints

As the REST API is still relatively new there might be some endpoints that don't currently exist such as getting the post archives where you would normally use the function wp_get_archives. This function will return a list of months with the post count next to that month. In this tutorial we're going to create our own WordPress endpoint that returns a list of months along with the post count with that month.

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To The Weekly Newsletter

Get weekly updates to your email