The QUID Payments plugin for WordPress supports the shortcodes [quid-button] and [quid-slider] to add a payment button or slider to your WordPress blog post, page, or widget area.

Using shortcodes within a blog post

Shortcodes will only work in a blog post that has it's Payment Type set to either None or Optional, that is, shortcodes will not work for blog posts that have a Payment Type setting of Required. When the Payment Type is set to Required, the visitor to the site must make a payment before accessing the full blog post content and in this situation it would not make sense to ask the user for an optional payment from within the article.

To add a shortcode within a blog post, open the blog post in the WordPress editor and hover your pointer over the location where you want the QUID payment button or slider to appear. Note that this will need to be between two WordPress editor "blocks" so that you can add a new block.

Select the shortcode block from the Widgets group:

In the new block add the shortcode:

Update the blog post (and, if you're using any content caching, clear any caches that might have the old post contents) and visit your page to see the new slider.

Using shortcodes within a blog page

Shortcodes can be used to accept donations or tips from within a blog page. They cannot be used to require payment before a blog page can be accessed.

To add a shortcode within a blog page, open the blog page in the WordPress editor and hover your pointer over the location where you want the QUID payment button or slider to appear. Note that this will need to be between two WordPress editor "blocks" so that you can add a new block.

Select the shortcode block from the Widgets group and in the block add the shortcode text:

[quid-slider initial="1.00"]

Save and publish the page changes and reload the page to see the slider.

Using shortcodes within a widget area

Shortcodes can be used to accept donations or tips in any widget area of your WordPress theme. Like shortcodes in WordPress pages, they cannot be used to require a payment to access blog content.

To add a shortcode in a widget area, navigate to Appearance > Widgets in your WordPress admin and add a Text widget.

In the new text widget, switch from the Visual editor to the Text editor (WordPress might suggest that you use a Custom HTML widget, but don't).

Add your shortcode to the text entry area and save your changes. Reload your page to see the payment option in your widget area.

Shortcode parameters

When a shortcode is used within a post, it will default to using the QUID payment settings for that post. You can use the following shortcode parameters to get the required appearance and behaviour:

align

The [quid-button] and [quid-slider] shortcodes use this option to determine the horizontal alignment of the button or slider. Possible values are left, right, and center. If this option is specified, it will override the global alignment setting for this button or slider only.

initial

The [quid-slider] shortcode uses this option as the initial value position of the payment slider. Set the value in dollars and cents (e.g. initial="0.23" for a 23¢ payment). If unspecified, the default value of $1.00 is used unless it is outside the range of the min and max slider values, in which case the value closest to $1.00 is used.

max

The [quid-slider] shortcode uses this option as the maximum value of the payment slider. Set the value in dollars and cents (e.g. max="1.23" for $1.23). If unspecified, the default value of $2.00 is used.

min

The [quid-slider] shortcode uses this option as the minimum value of the payment slider. Set the value in dollars and cents (e.g. min="0.02" for 2¢). If unspecified, the default value of $0.01 is used.

price

The [quid-button] shortcode requires this option and will use it as the price of the payment. Set the value in dollars and cents (e.g. price="0.23" for a 23¢ payment).

text

The [quid-slider] shortcode uses this option as the text to display on the payment button below the slider.

Example

Shortcode for QUID payment slider being displayed within a blog post:

[quid-slider min="0.01" max="0.50" initial="0.25" text="Donate now" text="Buy me a coffee" align="center"]

Resulting payment slider displayed:

Did this answer your question?