WP JSON API
A DEEP CODE DIVE INTO HOW TO EXTEND IT
Slides @ http://www.slideshare.net/pbearne
Code@ https://bitbucket.org/bearne/api_demo/src
Paul Bearne @pbearne
Freelance Senior Full Stack WordPress Developer,
Core contribs in WordPress versions 3.9, 4.0, 4.2, 4.4, 4.5 and 4.6
Bearne.ca
Plugin author of:
Author Avatars List ( https://wordpress.org/plugins/author-avatars/ )
WP Bullhorn Job Listing ( https://wordpress.org/plugins/bh-staffing-job-listing-and-cv-upload-for-wp/ )
WP Vote (https:// wp-vote.com )
Real-time Publishing for WordPress
Livepress.com
eLearning Solutions Powered by WordPress
UncannyOwl.com
#1 Outsourcing Service For WordPress
Codeable.io
$10 credit : https://codeable.io?coupon_code=WSQWI1
digital production and design agency
jam3.com
WP JSON API
TURNING WORDPRESS INTO AN APPLICATION FRAMEWORK
What will we cover today?
A bit on why it matters
How to install/setup
Where are the docs
What you get out of the box
How to mess with it
By the end, you should be able to:
Expose a custom post type in the API
View the output of the API
Send data to the API
Save data sent to the API
Return custom data to an API call
Why does it matter?
JSON data for free
Enables advance apps
Standardizes an AJAX endpoint
It makes WordPress an application framework
Performance – 15%+ faster
https://deliciousbrains.com/comparing-wordpress-rest-api-performance-admin-ajax-php
Install?
WP version 4.6 +
Install the plugin
Check permalinks are set
Test by loading /wp-json/wp/v2/posts
Install Postman and JSONview chrome tools
JSONView chrome extension
https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en
Postman chrome extension
https://chrome.google.com/webstore/detail/postman-rest-client-packa/fhbjgbiflinjbdggehcddcbncdddomop?hl=en
Where to get it (V2)?
http://v2.wp-api.org/
https://wordpress.org/plugins/rest-api/
Note: V1 docs are here http://wp-api.org/index-deprecated.html
What you get out of the box
http://local.wordpress.dev/wp-json/wp/v2
Note: V1 docs are here http://wp-api.org/index-deprecated.html
Code Read Through
THIS CODE STARTED USING V1, BUT I HAVE ADDED V2 CALLS.
THIS JUST ONE APPROACH.
Questions?
Hire Me...
PAUL@BEARNE.COM
Slides@ http://www.slideshare.net/pbearne
Email: pbearne@gmail.com

More Related Content

PDF
WordPress Plug-ins
PDF
WordPress Plugin - Chameleon
PPTX
Publshing to amazon kindle and apple i bookstore
PPTX
Lava con 2011 amazon and apple publishing workshop2
PPSX
Familiar Tools, New Possibilities: Leveraging the Power of the Adobe Web Pub...
PPTX
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
PPTX
Who Needs A Developer For Automated SharePoint Provisioning
PDF
WordCamp Birmingham 2016 - WP API, What is it good for? Absolutely Everything!
WordPress Plug-ins
WordPress Plugin - Chameleon
Publshing to amazon kindle and apple i bookstore
Lava con 2011 amazon and apple publishing workshop2
Familiar Tools, New Possibilities: Leveraging the Power of the Adobe Web Pub...
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Who Needs A Developer For Automated SharePoint Provisioning
WordCamp Birmingham 2016 - WP API, What is it good for? Absolutely Everything!

What's hot (20)

PDF
DevOps + MongoDB Realm Serverless Functions = 🤩
PPTX
Wordpress as a Back Office for Mobile Applications
PPTX
Building Chrome Extensions For Salesforce
PPTX
Internship Presentation 1 Web Developer
PDF
Introduction to polymer project
PPTX
Making your documentation more social
PPTX
Activate bots within SharePoint Framework
PDF
Charlie Cheever Facebook Developer Garage Uganda
DOCX
oDesk Cover Letter Sample for Back-Link Building
PDF
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
PPTX
Web Application Development Process presented by @Cygnismedia
DOCX
GENERATE PDF OF A WEB PAGE
PPTX
All you need to know about WordPress 4.7
KEY
Writing Your First Plugin
PDF
Progressive Web Apps - deep dive
PPTX
Front-end Performance 101
DOCX
Symfony framework-An overview and usability for web development
PDF
UI Design for Themes and Plugins by Chelsea Otakan & Sara Cannon
ODP
CRM Science - Dreamforce '14: From Admin to Developer: Learning to Code on F...
PDF
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
DevOps + MongoDB Realm Serverless Functions = 🤩
Wordpress as a Back Office for Mobile Applications
Building Chrome Extensions For Salesforce
Internship Presentation 1 Web Developer
Introduction to polymer project
Making your documentation more social
Activate bots within SharePoint Framework
Charlie Cheever Facebook Developer Garage Uganda
oDesk Cover Letter Sample for Back-Link Building
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
Web Application Development Process presented by @Cygnismedia
GENERATE PDF OF A WEB PAGE
All you need to know about WordPress 4.7
Writing Your First Plugin
Progressive Web Apps - deep dive
Front-end Performance 101
Symfony framework-An overview and usability for web development
UI Design for Themes and Plugins by Chelsea Otakan & Sara Cannon
CRM Science - Dreamforce '14: From Admin to Developer: Learning to Code on F...
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
Ad

Similar to WP json api (20)

PDF
WordCamp Wilmington 2017 WP-API Why?
PDF
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
PDF
Wp JSON API and You!
PDF
JSON REST API for WordPress
PPTX
WordPress Rest API
PDF
Using the new WordPress REST API
PPTX
Using WordPress as your application stack
PDF
Maine WordPress Meetup JSON REST API, 3/16/2016
PDF
WORDPRESS_REST_API_WORDPRESS_REST_API.pdf
PDF
Getting Started with WordPress JSON REST API
PDF
JSON REST API for WordPress
PDF
How to build Client Side Applications with WordPress and WP-API | #wcmia
PDF
WordPress is advancing rAPIdly - WordCamp San Antonio 2015
PDF
WordPress REST API v2: Overview & Exploring
PDF
Building WordPress Client Side Applications with WP and WP-API - #wcmia
PDF
2019 WordCamp Orange County - An Introduction to the WordPress REST API
PDF
Wordpress as a Backend
PDF
Building a mini-theme with WordPress REST API
PPTX
The WordPress REST API as a Springboard for Website Greatness
PPTX
The JSON REST API for WordPress
WordCamp Wilmington 2017 WP-API Why?
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
Wp JSON API and You!
JSON REST API for WordPress
WordPress Rest API
Using the new WordPress REST API
Using WordPress as your application stack
Maine WordPress Meetup JSON REST API, 3/16/2016
WORDPRESS_REST_API_WORDPRESS_REST_API.pdf
Getting Started with WordPress JSON REST API
JSON REST API for WordPress
How to build Client Side Applications with WordPress and WP-API | #wcmia
WordPress is advancing rAPIdly - WordCamp San Antonio 2015
WordPress REST API v2: Overview & Exploring
Building WordPress Client Side Applications with WP and WP-API - #wcmia
2019 WordCamp Orange County - An Introduction to the WordPress REST API
Wordpress as a Backend
Building a mini-theme with WordPress REST API
The WordPress REST API as a Springboard for Website Greatness
The JSON REST API for WordPress
Ad

More from Paul Bearne (9)

PPTX
Childthemes ottawa-word camp-1919
PPTX
Vagrant WordCamp Hamilton
PPTX
Unit tests with vagrant
PPTX
WordPress overloading Gravityforms using hooks, filters and extending classes
PPTX
How To Set a Vagrant Development System
PPTX
HirshHorn theme: how I created it
PPTX
WortdPress Child themes: Why and How
PPTX
Daughter Themes
PPT
Author Avatars List demo slides
Childthemes ottawa-word camp-1919
Vagrant WordCamp Hamilton
Unit tests with vagrant
WordPress overloading Gravityforms using hooks, filters and extending classes
How To Set a Vagrant Development System
HirshHorn theme: how I created it
WortdPress Child themes: Why and How
Daughter Themes
Author Avatars List demo slides

Recently uploaded (20)

PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Computer Software - Technology and Livelihood Education
PDF
Autodesk AutoCAD Crack Free Download 2025
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PPTX
Matchmaking for JVMs: How to Pick the Perfect GC Partner
PPTX
GSA Content Generator Crack (2025 Latest)
PPTX
most interesting chapter in the world ppt
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
iTop VPN Crack Latest Version Full Key 2025
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
Microsoft Office 365 Crack Download Free
PPTX
Full-Stack Developer Courses That Actually Land You Jobs
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PPTX
Cybersecurity: Protecting the Digital World
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Trending Python Topics for Data Visualization in 2025
CNN LeNet5 Architecture: Neural Networks
Topaz Photo AI Crack New Download (Latest 2025)
Computer Software - Technology and Livelihood Education
Autodesk AutoCAD Crack Free Download 2025
How to Use SharePoint as an ISO-Compliant Document Management System
Matchmaking for JVMs: How to Pick the Perfect GC Partner
GSA Content Generator Crack (2025 Latest)
most interesting chapter in the world ppt
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
iTop VPN Crack Latest Version Full Key 2025
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Tech Workshop Escape Room Tech Workshop
Microsoft Office 365 Crack Download Free
Full-Stack Developer Courses That Actually Land You Jobs
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Cybersecurity: Protecting the Digital World
Visual explanation of Dijkstra's Algorithm using Python
Weekly report ppt - harsh dattuprasad patel.pptx
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access

WP json api

Editor's Notes

  • #3: Some of smallest patches
  • #4: I am freelance so I need clients that will pay me to allow me to talk at WordCamp! These are some of my clients that I help with their complex problems whose products you may find useful LivePress is real time microblogging that is native on WordPress. It is available as part of WordPress.com VIP platform.
  • #5: I am freelance so I need clients that will pay me to allow me to talk at WordCamp! These are some of my clients that I help with their complex problems whose products you may find useful LivePress is real time microblogging that is native on WordPress. It is available as part of WordPress.com VIP platform.
  • #6: Uncanny Owl are eLearning experts that can help you and your clients provide eLearning solutions
  • #7: We know it's hard to find a reliable WordPress expert when you need one, which is why we've set on a mission to bring them all to one place: here. Join us and benefit from: a steady income with a guaranteed minimum hourly rate working with great, loyal clients being a part of our reputable expert community
  • #10: In this talk, I will show you how to use the WP JSON API to add your own end-point for a custom post type or add/change data being returned. I will walk you through real, production level example code that extends the API and  show you how simple it can be and how few lines it takes once you get your head around it.
  • #12: Json doesn’t load the admin code
  • #18: Not complete code Mixed v1 1nd 2