Home Blog

wordpress rest api

  • WordPress REST API: Schema & Validation

    In the WordPress REST API, args do the checking for you. Mark a param as required and core answers 400 restmissingcallbackparam before your callback runs. Give it a…

  • WordPress REST API: Auth & Permissions

    Authenticated ≠ authorized: a guest gets 401, a logged-in Editor gets 403 rest_forbidden. Three wp.org reviews of our plugins, three questions: â‘  Who may call the route? 4WP…

  • WordPress Abilities API: what is this?

    WordPress Abilities API: what is this?

    The Abilities API is the list of what your WordPress site can do and what it allows. Core, your theme and your plugins each add their own abilities.…

  • Custom REST Endpoints in WordPress

    Custom REST Endpoints in WordPress

    wp/v2 belongs to WordPress core. Your plugin needs its own namespace. Real code from our plugins on wordpress.org: Go deeper

  • WordPress REST API & CRUD

    WordPress REST API & CRUD

    Every app speaks four verbs. WordPress too: /wp-json/wp/v2/ CRUD: Read is open for public data: GET returns 200 with X-WP-Total and X-WP-TotalPages. Write? Prove who you are: POST…

  • Headless WordPress: why WPGraphQL wins

    Headless WordPress: why WPGraphQL wins

    Cut the head off WordPress: it serves the data, a JS frontend renders the page. With REST, one post page can mean four round trips: post, author, categories,…