AppPresser allows you to use your WordPress membership plugin in your iOS and Android mobile app.
A membership plugin restricts access to website content based on membership level, and your app can do the same. If you have a membership site, you can create a mobile app that shows content based on what each member has access to.
The end result is that members only content will be hidden from your app users unless they login, and have the appropriate membership level.
In this article I’ll show you how to setup your membership app, using Restrict Content Pro, an excellent membership plugin by Pippin’s Plugins. (Using RCP is not required, most membership plugins should work with your app)
How it works
The membership functionality in your app will work just like it does on your website. For example, if you have some protected pages, your app users will not be able to access those unless they have the appropriate membership level. They will be required to login through the app before they can see any protected content.
All payments, registration, content protection, and other features of your membership plugin will continue working as usual. AppPresser only handles the display of your membership pages, it does not change how it works, or handle any back-end processes.
Building a membership app with Restrict Content Pro
To build your app, first you need at least the AppPresser core plugin and AppTheme installed. Next, you will need your membership plugin installed and configured, you can find Restrict Content Pro installation instructions here. I won’t go over configuring these products here, please set them up before continuing.
At this point you should have a website with the above plugins installed and configured. To turn this into a membership app, we need 3 things:
- Protected content
- A registration page
- A login page
If you have protected content, you need a way for members to login to view it. Registration is not technically necessary, but allowing users to at least sign up for a free level is a great way to generate more leads for your premium membership.
Free content is not required, but it’s nice to give people something to see before they commit to registering.
The pages you protect are controlled through your membership plugin. I’m going to add a membership page that has a video that only premium users can access.
In RCP (Restrict Content Pro), there are options at the bottom of the page edit screen that allow you to restrict based on certain conditions. I am going to require at least the “Silver” membership to view this video.
You can configure other options as desired, and protect other pages and posts. This is a simple example, so I’ll stick with just one members-only page.
Login and registration pages
We need to create a way for our members to register and login, and add those pages to our app menu.
AppPresser has a built-in login modal that works great with membership sites. You can access it in the side menu, as pictured. This does not require any configuration.
You can also access this login modal in any post or page by inserting the following HTML:
<a href="#loginModal" class="io-modal-open">Login here</a>
That covers logging in, now we need a registration page. This is optional, and it should only be for free registrations.
To add a registration page, reate a new page and call it “Registration,” and add this shortcode:
Register New Account
Go to your Restrict Content Pro Settings, click the Signup Form tab, and make sure the page you just created is selected.
Next, add that page to your app menu, along with any other pages you want displayed in your app. As you can see above, I have added a ‘free’ page that is open to anyone, the registration page, and a members only page.
Now, as a non-logged in user, I won’t be able to see anything on the membership page. When I login, I can see the protected content.
Any content that you marked as protected will behave the same way. You can configure your app to hide menu items to non-members, and customize in other ways that are described in the RCP documentation. Anything you configure in your membership plugin should work the same way in the app and on the site. (Note that AppTheme uses ajax, which does not work with all plugin features, so it’s important to test)
Registration and payment in app
Allowing free users to register through your app is a great way to widen your audience. AppPresser has a built-in API based registration form that has email validation.
Taking payments for premium memberships is possible using in app purchases. If you take payments through your app, you may be required to use Apple’s in app purchase API, which gives them a 15-30% commission.
This requires extra setup, please see our documentation for instructions.