Let's build an Ionic app for your Wordpress site using Wordpress REST API! This ionic tutorial will show you how to communicate with the WP API in order to get your Wordpress posts, categories, comments. We also added Wordpress Login using JWT .This ionic tutorial includes a working example you can reuse for your needs!
This app is built using Ionic 5 and Angular 11.
The old version used Ionic 3, if you are still working with Ionic 3, check the Ionic-v3 folder.
Please support this project by simply putting a Github star โญ.
๐ค Check the complete step by step tutorial.
๐ Try the demo.
Install dependencies
npm install
The REST API is included in the Wordpress Core from WordPress 4.7! Plugins are no longer required, just install the latest version of WordPress and you're ready to go. In order to check that you are able to make requests to the REST API you only need to make a request to the following url: http://YOUR-WORDPRESS-SITE/wp-json/wp/v2/ Please note that you need to change 'YOUR-WORDPRESS-SITE' with your own value.
ionic serve
This project uses Capacitor (spiritual successor to Cordova).
Read this post to get an introduction about Capacitor and learn the main differences between Capacitor and Cordova.
Before starting make sure to read the Capacitor Required Dependencies.
The Capacitor workflow involves a few consistent tasks:
Read how to build this app for iOS.
Read how to build this app for Android.