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.
How to let visitors pay to submit a post
There are so many scenarios that use pay-per-post, making it be impossible to write a tutorial covering them all. Instead, I want to offer an overview of the options, with links to knowledge base articles where you can learn more. Make it happen in five simple steps.
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 - Setup 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 content 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.
Step 3 - Require payment before the post is published
The Post Status field you setup in step 1 means that your form will save new posts as drafts. These drafts will be published once payment is completed.
To enable pay-per-post functionality, 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 "Published" 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 the 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.
Get started now
Not using Formidable Forms yet? Download the most powerful form creator and application builder today.