<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=442498563201411&amp;ev=PageView&amp;noscript=1">

WordPress: Creating a Subscription Button in the LaterPay Plugin

Topics: WordPress · Subscriptions
Experience Level: Intermediate
June 29, 2020 · 5 min read




Tip: Did you know that LaterPay has two WordPress plugins?
Click here if you're looking for the Revenue Generator plugin.




In this section, we are going to go through one of our most popular features of the LaterPay plugin: the Subscription Button. We will walk you through how to create your own subscription (or time pass) button that you can post anywhere on your site - this is perfect for promoting your subscription offer in the header or in pop-ups.

Subscribe NowThe button can be generated using a WordPress block or WordPress shortcode. Both of these methods allow you to create objects that would 

normally require lots of complicated, ugly code in just one line.


If you would like to add a LaterPay button to your site template, we recommend you skip to our instructions on using the shortcode; otherwise, continue reading to learn about LaterPay Blocks.


Using a Block

The simplest way to add a Subscription or Time Pass button to one of your posts or pages is to use WordPress's block functionality. Once you have installed and set up the LaterPay plugin, in the WordPress Editor, simply:LaterPayWordPressBlocks

  • Click to add a new block
  • Scroll down & expand the LaterPay Blocks section or search for the following block
  • Select "LaterPay Purchase Button"

Once you have added the block, configure the settings as desired in the block settings menu displayed along the right side of your screen. Once these are configured, simply update or publish your article to make your changes live!


Using a Shortcode

WP_Subscription_2The LaterPay WordPress Plugin provides you with a custom shortcode that allows you to quickly and easily generate a button to promote your LaterPay time pass or subscription.

If one of your viewers clicks the button, they will be taken to the purchase screen just as if they had selected the option from one of our paywalls.




If you are familiar with shortcodes, feel free to skip to the "Shortcode Details" section below; otherwise, here is a quick example to familiarize you with all of the customization options available.


    1. On the paywall tab, subscriptions and time passes are identified with an ID number. Find the pricing option that you would like to use for your button. For this example we will create a button for our 1 Month Subscription, Sub 8.
      WordPress Plugin Pricing Tab

    2. Next, if you don’t want to use our default button (shown at the top of this article), take some time to decide how you would like the button to look.
      1. For this example, we will have the button say “Subscribe for only $3.99 Now!
      2. With an orange background: “#F2902A
      3. And light blue-grey text: “LIGHTSLATEGRAY

    3. Now let’s map these to the parameters outlined in the "Shortcode Details" section below:


      Our Customization



      button_text Subscribe for only $3.99 Now!
      button_background_color #F2902A
      button_text_color LIGHTSLATEGRAY
    4. Now that we know what value we want for each parameter, we simply re-write it as a WordPress shortcode:
      [laterpay_subscription_purchase id="8" button_text = "Subscribe for only $3.99 Now!" button_background_color="#F2902A" button_text_color= "LIGHTSLATEGRAY"]
    5. Then I simply copy and paste my shortcode (above) into the Text editor anywhere on my WordPress site and the button (below) will appear when you update your post!
Subscribe for only $3.99 Now!

Shortcode Details

Now that you have seen an example, here are details on all of the different options available. Note that only the first parameter is required; the rest are completely optional.





laterpay_time_pass_purchase id
laterpay_subscription_purchase id
This is the ID shown on paywall tab (above). You will either use the time pass code OR the subscription code. Each button can only have one pricing option.


Note that there are different shortcodes for time passes and subscription; be sure to use the right one!

button_text This is the text that you would like to be displayed on the button Optional
button_background_color This will accept an html color name or hex code Optional
button_text_color This will accept an html color name or hex code Optional
custom_image_path Provide the URL of the image Optional; if you provide a custom image path, the button text and background settings will not be applied


If your shortcode does not appear to be working:


  1. On your WordPress installed plugins page, ensure that your LaterPay plugin is on version 2.5.0 or higher; this feature is not available in earlier versions of the plugin.
  2. Ensure that you are using the correct starting parameter. 
    [laterpay_time_pass_purchase is required for Time Passes &
    [laterpay_subscription_purchase is required for Subscriptions.

Next up, let's take a look at how to charge for downloadable content!


Further Reading