How to Charge for Downloadable Content in the LaterPay WordPress Plugin

Now that you have your WordPress Plugin set up, we want to introduce you to one of our more advanced features  the ability to charge for downloadable content. Although this is one of our more “advanced" features, it is still quite simple to set up thanks to WordPress shortcodes.

 

According to WordPress.com “A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut.”

The [laterpay_premium_download] shortcode allows you to quickly and easily charge for downloadable content. Here’s how:

  1. Ensure that you have the "Media" content type enabled on the LaterPay Pricing tab
  2. Upload the downloadable content to the WordPress Media section
  3. Open the content from within the WordPress Media section
  4. In the URL there should be text that reads something like “item=138” – take note of that item number
  5. Click “View attachment page” and then click “Edit” to edit that page. Once you are on the Edit screen – which will look very similar to the Edit Post page – you can set an “Individual Price” which will be the price that a reader must pay to access this piece of content
  6. Set-up is complete! Now we just need to display the download link on the page. This is done by placing a [ laterpay_premium_download ] shortcode in your post wherever you would like the download widget to appear.

Before we dive into the details, here is an example of what this could look like and the code used to generate it:

Downloadable Content Example: The state of paid Content $2.99This example uses the following short code:

[laterpay_premium_download
target_post_id="138"
heading_text="The State of Paid Content"
description_text="The ad model is still broken, the ‘pivot to readers’ is incomplete, and conditions are right for business model experimentation."
content_type="file"
teaser_image_path="/wp-content/uploads/2018/11/TheStateOfPaidContent.png"]

 

Shortcode Details

Now that you have seen an example, here are details on all of the different options available. It’s worth noting that the only thing that is required is the target_post_id, which lets LaterPay know what you want to sell. Everything else is completely optional.

Parameter

Description

Notes

target_post_id The WordPress id of the page that contains the paid content REQUIRED; see step 4 above for more details
heading_text The text that should be displayed as a heading in the teaser box; restricted to one line Optional
description_text Text that provides additional information on the paid content; restricted to a maximum of three lines Optional
content_type Choose between ‘text’, ‘music’, ‘video’, ‘gallery’, or ‘file’, to display the corresponding teaser image (examples below) Optional; will be overwritten if a teaser_image_path is provided
teaser_image_path Path to an image that should be used instead of the default LaterPay teaser image

Optional; detailed instructions below

 

content_type & teaser_image_path examples

content_type

image to display

content_type=”text” content_type: text
content_type=”music” content_type: music
content_type=”video” content_type: video
content_type=”gallery” content_type: gallery
content_type=”file”
(default if both content_type & teaser_image_path are left blank, the image will default to ‘file’)
content_type: file
teaser_image_path=”…”

To add a custom image as is done in the provided example:

  1. Upload the image you would like to appear in the background
  2. In the Media Library, click on this image
  3. Copy the media URL
  4. In your short code paste the media URL inside double quotes after “teaser_image_path=”
  5. Erase the first portion of the URL so that what is remaining in the short code starts with “/wp=content/uploads/…”

For example: if the URL for the image in the example above were


http://laterpay.net/wp-content/uploads/2018/11/TheStateOfPaidContent.png


and the corresponding short code parameter is


teaser_image_path="/wp-content/uploads/2018/11/TheStateOfPaidContent.png"

 

Something not working?

If your [laterpay_premium_download] shortcode is not working, use the WordPress HTML tool to ensure that there is no HTML inside your shortcode. If there is HTML inserted into your shortcode, simply remove it; that should do the trick!

 

Click here to contact LaterPay support; we're always happy to help!