Skip to content

A small demo to show how you might interact with the WP API.

Notifications You must be signed in to change notification settings

maplerock/wpchelt-headless-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A getting starting guide to working the WordPress API

A little JavaScript app put together for the WPChelt Meetup to show how you can intereact with the WordPress API. Note: This is a proof of concept and should not to be used in the wild and is 'rough around the edges'!

  • I'm using Gulp to compile the JavaScript and SASS to CSS.
  • It uses Vue.
  • You'll need a WordPress install to interact with and amend the end point URL accordingly.

Authorising Requests (Creating, Updating, Deleting) Posts...

THIS SHOULD ONLY BE USED FOR TESTING PURPOSES. DO NOT USE IN THE WILD!**

You'll need to install this plugin on your WordPress install. https://github.com/WP-API/Basic-Auth

Then send a base 64 encoded version of your username:password along within the Authorization header. https://www.base64encode.org/

headers: { 'Authorization': 'Basic YWRtaW46YWRtaW4=' }

About

A small demo to show how you might interact with the WP API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published