Android App for your WordPress Site with REST API

Should you build a mobile app for your WordPress site or should you go with a responsive theme, this is a discussion that has split my WordPress developer friends.

A bunch of them stick with the notion of using a responsive theme design, and design the site so it shows as a mobile app on a mobile device and shows as a web app in web browser.

If you take a look at  my website, if you open it in a mobile it looks different then when you browse it on a laptop. This is all done with responsive design using html, css that should be sufficient for a basic WordPress blog.

Try my website on your mobile device and you find a different view than on a laptop. Here is how it looks like on a mobile device.

Mobile APP

Back to the other side of my WordPress developer friends, they say you should build an app for mobile devices, their argument is that with your own app you are shown as an image in the list of apps on your device, and that would give you more exposure and likelihood to get more followers.

So, I decided as an experiment, to build me an Android app. I started out with defining the business requirements for the app, very basic – show categories, the latest posts and show the full posts from my WordPress site.

Next I did a wireframe on how I wanted the mobile app to look like and then I started to develop the android app using Android Studio with gradle build.

To get the categories, posts and detailed post data from my WordPress site, I used the WordPress REST API – to work with the REST API in Android I choose to use the Android Volley library.

Here is a good article – Android working with Volley Library if you are intrested to learn how to use the Volley Library.

Setting things up

The first thing you need to do is install the REST API plugin on your WordPress site. After the REST API plugin is installed and activated, you can visit your site to see the basic JSON object. It looks something like this:


You can see elements of your site by appending the url, such as, or

That’s the data that we’ll use to pull into the mobile app.

The mobile app

This shows how my mobile app looks like.

Custom post types (CPT)

The Android app is simply going to display custom post types from WordPress. The only thing we are getting from the website is the data through the REST API.

To get custom post types, we can access

I created a post type called “News” for this app, so I can access the data I need at


My JSON data for the news CPT looks something like this:

"id": 5836
"date": "2015-12-29T14:41:26"
"date_gmt": "2015-12-29T13:41:26"
"guid": {
"rendered": ""
"modified": "2015-12-29T14:41:26"
"modified_gmt": "2015-12-29T13:41:26"
"slug": "browse"
"type": "page"
"link": ""
"title": {
"rendered": "Browse"

If you don’t have a custom post type, that’s ok, you can access your posts at Go ahead and visit that url to view your JSON data.

That object gives us access to everything we need: title, excerpt, content, featured image, author, etc. We can now pull that data into our app, and display it any way we want.

Just compile your app with Android study and publish it on Google Play and you have your own Mobile App working with your WordPress site.

You can get my Android App from here to see how it works


If you are intrested in getting your own mobile app, just get in contact and I can help you with all aspects of develop a mobile app strategy for you.

[contact-form-7 404 "Not Found"]

15 Responses

  • maraya on June 14, 2016, 18:56:50

    can you send me this sourcode?

    Reply to maraya
  • Jafid on June 22, 2016, 17:45:08

    Hi, I’m trying to create a native android app and I’m using the WP Rest API and the Android Volley library, currently im receiving in the response of the Volley the JSON from my custom post type, but I dont know whats the next step to display the post correctly in the app, can you help me getting that to work?

    Reply to Jafid
  • Nell on September 14, 2016, 20:51:50

    Howdy! Quick question that’s emtirely off topic. Do you know how to make your
    site mobile friendly? My weblog looks weird when viewing fropm my iphone 4.
    I’m trying to find a theme or plugin that might be able to correct this problem.
    If yyou have any recommendations, please share. With thanks!

    Reply to Nell
  • jaswanth on December 23, 2016, 06:32:07

    Hey as of Dec.2016, as Rest API is built into WP 4.7, do we still need to install a plugin ?

    Reply to jaswanth
  • Jethendra on February 15, 2017, 08:42:31

    Hi , I have a doubt.. Can the content contain image Urls along with text ? If yes how can we show text and Image seperately.. Please help me out.. Thanks in advance

    Reply to Jethendra
    • torbjornzetterlund on February 15, 2017, 15:07:10


      What do you mean with “contain image Urls along with text”, do you want to display an image or do you want to display a link to an image?


      Reply to torbjornzetterlund
  • Ali on October 14, 2017, 18:57:07

    Hello Sir, i got 2 questions, how can i get all the css for the WordPress site at once, instead of using the browser Inspect.
    Second questio is, which is better, Volley or Retrofit

    Reply to Ali
    • torbjornzetterlund on October 25, 2017, 08:41:50

      I prefer Volley, it’s a personal choice, what you are used to, there is a bit of a learning curve using a new library.

      You should find the .css library of a theme, in the WP Folder wp-content->themes->

      The android app I have do not use the the .css of the the theme of my wordpress site, the Android app is a separate UI design.

      If you want to have your WordPress site to display in a mobile browser, you need a responsive WordPress theme that smoothly adjusts its layout based on the screen size and resolution. That is not an Android app, you would need to use a browser app on your phone to get the responsive WordPress theme to show.

      I hope that answers your questions.

      Reply to torbjornzetterlund
  • Ali on October 21, 2017, 07:53:09

    Does you code handle JavaScript function within the content for the Posts?

    Reply to Ali