I help people using my Clarity account
On average, my calls last less than 20 minutes because I try hard to make sure we get to the point quickly and that I add value right away. After all, when you’re paying by the minute, you don’t want to have someone wasting your time, right?
Anyway, a lot of the calls I get are WordPress related, and many of them focus on membership sites. But this call was different. The caller wanted to sell pay per view documents within WordPress.
Building a Pay Per View Documents Repository
This system was focused on selling access to PDFs. The caller knew WordPress and hoped it could get him a quick prototype or minimal viable product.
When you see the workflow, you’ll know right away that it was totally within the realm of what WordPress can do.
- Staff use a form to fill out a lot of detail about the PDFs.
- Staff upload the PDF in question.
- Clients come to the site and search for documents.
- They see excerpt summaries of the available files.
- They are then asked to pay, in order to access the file.
- They pay and are shown the full post, with a link to the PDF file.
So here are the steps to build a system like this.
1. Get the plugins you’ll need
To build a system like this, you’ll need a form plugin, along with a pay per view protection plugin, and given how I built it, you’d need a way to create custom post types.
Since I use Gravity Forms for most of my demonstrations, this time I decided to use Formidable Pro. After all, you can see how features like uploads are available in Formidable Pro, Gravity Forms, and Ninja Forms – as I recently compared them.
I also used WPMU Dev’s Pay Per View – which only costs $19 (at this time).
And the last plugin I used doesn’t actually create a custom post type, though there are many out there that do that. Instead I used a different plugin that registers my code tweaks. It’s called Code Snippets. It’s pretty cool.
What I like about it is that you can drop in any code that you would normally put into your theme’s functions.php file but this keeps it available even if you change your theme. You’ll see I dropped in code for creating a new post type (more on that later).
But more than that, you also have a nice simple way to turn these snippets on or off.
As I mentioned above, I created a custom post type called PDF Files. I did this because I prefer keeping these posts segregated from the rest of the posts on the site. Additionally, the Pay Per View plugin gives me the ability to protect CPTs and that makes this really easy.
So below, you’ll see the code I used (standard stuff) to create the custom post type.
Now, if you want help creating custom post types, and don’t know the syntax for all the different options, you can also use plugins to do this, or get code like this by using online tools like generateWP.com.
3. Activate Formidable Pro & Pay Per View
Activating Formidable Pro and the Pay Per View plugins is pretty simple – nothing out of the ordinary there. After installing them, you click “activate” under each one, in the plugin area of your WordPress installation.
Formidable Pro gives you lots of options to configure when you install it, but other than putting in your license key, you are fine to accept all the defaults.
The Pay Per View plugin also gives you options. Here I had to configure some of the settings, as well as putting in my PayPal info, so I could get paid.
You’ll notice that I disabled protection for posts and pages, but turned it on for CPTs. That’s a really easy thing to do when the only CPT on the site is specifically created just for this purpose.
The other thing I configured was that I let Google access the posts – so that all these posts are available on Google. After all, this is a site that would want that kind of traffic, right?
4. Create Formidable Pro Form
You can get a lot fancier than I did for this demo, but honestly, my goal was simply to demonstrate the possibility of making this all work (and pretty quickly, at that).
Here’s the simple form.
It collects the title (single line field), the excerpt and full summaries (paragraph fields), and a field for the PDF upload.
The almost harder part comes when you want to create a custom post type from this.
As you look at this, you’ll notice three things.
- It’s really easy to configure.
- In the Customized Content Area, I put the short codes for the full summary, as well as the reference to the file.
- In the shortcode for the file, I added “clickable=1” which turns the reference into a link.
Like I said, it’s almost hard. But honestly, it’s not.
The result is a post that’s created automatically, but since it’s a custom post type, it’s automatically protected, until someone pays the requested fee.
There’s no step 5
I wish there was more to tell you about this process, but that’s about it.
Well, actually, that’s incorrect. There’s a step five. Put the form (the one that lets you upload files) on a page. But what’s the point of creating a form if you won’t do that, right?
From there, you’re good to go.
Seeing it all work out
If you’re logged in to your own site, you won’t see it work, since you likely have it configured like I did – not protecting files from an admin.
But if you log out, you’ll see it work right away.
Here are four sample screens that show you the form, the search results, the pay per view protection, and the final post.
That’s all there is to it.