Are you building a directory or classified ads website? Do your users pay to submit posts? Did you know Formidable is an easy pay-per-post solution?
Pay-per-post solutions for WordPress have been around for years. They are essential when building an online directory or classified ads website. Users pay a small fee for each ad they place or each listing they submit.
This is kind of the opposite of restricted content. Instead of selling access to pages, you accept payment and allow users to upload a page or post on your WordPress website.
You may have seen that there are several pay-per-post plugins too. These come with a lot of options, like custom post types, various payment gateways, and even options to post with WooCommerce!
But depending on what you are trying to do, a dedicated WordPress plugin that only handles one thing might be overkill. For example, the plugin "WooCommerce pay per post" will only allow you to add one simple feature to your site.
In this tutorial, we are going to show you how a WordPress form builder can give you the most powerful pay-per-post options of all! Let's get into it.
Looking for ways to "restrict content"?
Before we get started, let's make sure you aren't looking for something else. Many people get the concept of "pay-per-post" twisted up with "restricted content". These are not the same thing!
If you are looking for a way to help users access restricted content like digital downloads and subscription plans, then you might want to check out the following post: 4 Ways to Protect WordPress Media Files.
Set up pay-per-post with a form builder plugin
Since there are many scenarios where pay-per-post can be used, the following method is flexible enough to work however you need! Although you can't do this using the free version of Formidable Forms, our premium versions are worth checking out.
Not only will you be able to handle pay-per-post with ease, but you'll get access to a huge range of features that will improve every aspect of your WordPress site. Check out our pricing plans to learn more!
Step 1 - Build a WordPress pay-per-post form
Add the fields you need to create a new post, including a title and the main text content. A contact number, address, and a featured image upload are a great base. For a classifieds website, you might want to add fields for the item category, item condition, and item price.
Add a Post Status field to your form which defaults to "draft". Mark this field as read-only and set the visibility to "Administrator".
It is often sensible to require users to register before submitting a new listing. Add a User ID field to your form to create a link between form submissions and the logged-in user that created them. This allows users to edit and update their own listings from the frontend.
Step 2 - Set up your form to create a WordPress post
The action to create a new post can be as simple or as complex as you'd like. A single field for your post content gives a quick and simple layout. Or create a View to display your form submissions with a more customized layout and style. This option allows you to create almost any kind of look you can imagine, so it is often worth the extra effort.
Read more: How to setup front-end posting in WordPress
Step 3 - Require payment before the post is published
The Post Status field you set up in step 1 means that your form will save new posts as drafts. These drafts will be published once the payment is completed.
To enable pay-per-post functionality, we need to activate a payment method. Add a payment action to your form using either PayPal or Stripe. These two gateways offer instant transactions and automatic confirmation. Payment confirmation triggers post publishing.
Set the "After Payment" action to change your Post Status field to "publish" on payment completion.
Step 4 - Display your paid posts
This step depends a lot on your theme. Most themes have built-in templates to display posts in an attractive way with minimal customization.
Display your listings with the most recent first. Ensure that your navigation and search allows users to quickly and easily find what they want.
Step 5 - Let users edit their listings
Allowing your users to edit and update their own entries is essential. This can easily be done with a View that is filtered by the current user.
You should also include a deletelink so listings that have sold or are no longer valid can be easily removed by the user.
Bonus step - Auto expire the user-submitted posts
Pay-per-post sites work in multiple ways. Some pay once for a lifetime post, others require renewal to keep the post published, or simply remove the post after 30 days. The form action automation add-on will conditionally trigger an API call. That API call will change the status of the post back to draft.
Pretty awesome right? Wait though - it gets even better!
Similar pay-per-post systems can use Views instead of posts. This has two major advantages:
- It's easier to build custom layouts for your listings.
- Built-in filtering options for easier auto-expiration listings after a set time period.
The process is very similar to what is shown above. Step 1 is the same, except the Post Status field should be a normal dropdown instead of the one added via the create post action. Step 2 can be skipped completely, and Step 3 remains the same.
Things change a little in step 4. Instead of creating a post, use a View instead.
The View type you need is Dynamic (both). Setup your main content to display an overview of your listings, with the most important information and an excerpt of the main text. Then the detail page contains in-depth information.
The View gives you full control, allowing you to customize the HTML directly. Setup any layout you wish. For many business directories, a single column layout may be preferable. But for a classified adverts site, a three or four-column layout often works best.
Your View can now be filtered to exclude drafts and filtered by date, so only listings from the time period you specify are displayed.
Wrapping up
As you can see, there are a ton of customization options at every step! With Formidable Forms, you'll be able to set up pay-per-post however you want... plus you'll be able to do a whole lot more. Check back often to see more tips on the Formidable blog! Bye for now.
Not using Formidable Forms yet? Download the most powerful form, creator, and application builder, today!
Gav Grayston says
Great post, Nathanael.
How could I add workflow into this step, so that an editor can review the post content and publish it (or schedule it for later), and then have it charged to the customer only when the post is published?
Nathanael Jones says
Would you be able to open a ticket in the help desk with this question? It may be a bit in depth to discuss here...
Jaba says
Have you ever thought about adding support to pay to post with woocommerce (this will open up a much broader payment options).. I just need this feature to purchase this plugin
Nathanael Jones says
This isn't possible at the moment - but I agree it would be a very good way to allow a wider range of payment gateways.
Matt says
Hi, thank you for the tutorial. I need this feature but it's unclear what package I need to achieve this - Basic? Business? The plugin just tells me to upgrade to pro and the feature list does not shed much light either. Thanks!
Nathanael Jones says
Hi Matt,
PayPal payments are included in the Business license - but you would need an Elite license to access the Stripe payment add-on.
Eugene says
I also need this feature, however, the blocker here are the payment options. Stripe and Paypal are not allowed in my country. Opening this up to woocommerce will allow local payment gateways and other options like invoice, etc.
srwells says
Thanks for letting us know of this issue for you. We are always looking to make the plugin better. Hopefully we'll get expanded support that will work for your needs in the near future.
mpivon says
Great article and it works like a charm. Thank you. Now, another question:
I can make this all work with a single amount for any category. BUT, what if I want to charge a different amount based on a certain category? i.e.: A visitor submits something for "cars" - they will be charged $10.00, but for apartments (as another category) they get charged $25.00? Right now, every submission just gets charged $10.00 across the board.
Oh, and lastly, I want this all on the same form. I don't want to create multiple forms - i.e. one form to submit for cars, and another form for apartments. Rather, I want them to fill out their details, pick a category, and get told they need to pay $25.00...
Alternately, they could have a bunch of radio buttons or a dropdown where they choose the category and the cost associated with posting in that category. From there, they would click submit, and the amount that is parsed to Paypal or Stripe will be $10.00 or $25.00 - as appropriate.
Just as long as it's all on the same form submission that then goes to the processor and comes back to the site as 'paid'.
Got any tips to make that happen?
Nathanael Jones says
Could you please open a ticket in our helpdesk with these questions? https://formidableformscom.bigscoots-staging.com/new-topic/
Thank you!
Nick Laux says
This article is a nice start, but it could really just skims over all of these important areas. Especially the area about adding a Paypal action to the form. IMO, this article definitely needs another step that describes how you ad the payment section to the form, as this article just explains how to add a paypal action, but not setup the actual payment fields.
srwells says
Thanks for the feedback. On our blog, we do generally try to do a high-level overview of the steps and instructions. For details, you may need to refer to our documentation for individual steps. Here is our documentation on adding a PayPal action: https://formidableformscom.bigscoots-staging.com/knowledgebase/formidable-paypal/
If you need additional help, please reach out to our support team.
julius rosen says
what store plugin would this work with ?
Jonathan A says
Hey Julius,
This can work as a standalone solution. No need for additional plugins. If you have any further questions please create a new ticket here: https://formidableformscom.bigscoots-staging.com/new-topic/
julius rosen says
so with a palt to post and a pay to see a psot we have an ideal dating site ?
Jonathan A says
Hey Julius,
Yes, that is a workflow you can accomplish.If you have any further questions please create a new ticket here: https://formidableformscom.bigscoots-staging.com/new-topic/