1. Home
  2. GT-Vouchers
  3. Shortcodes

Shortcodes

VoucherList example
VoucherList shortcode output, with description

There are three custom shortcodes available to display vouchers on your site. This allows you to place a single voucher wherever you want, create a dynamic list of active vouchers or allow registration for a voucher somewhere other than the listing.

Single Voucher

The first shows a single voucher and is in the format:

[voucher id=”123″]

The “id” parameter is the unique ID of the voucher. The correct ID to use is available in the screen where you edit the voucher.

You can also how the description after the link:

[voucher id=”123″ description=”true”]

List of Vouchers

If you want to show a list of your active vouchers, you can use this shortcode to do so:

[voucherlist]

And a list of all live vouchers with their descriptions:

[voucherlist description=”true”]

And a list of all live vouchers with expiry dates:

[voucherlist showexpiry=”true”]

And show the list with only vouchers in specific categories:

[voucherlist category=5,7]

Of course, you can combine any of the options to really customize your list:

[voucherlist category=5 description=”true”]

In the GeoDirectory version (only for now) you can also display a miniature preview of your voucher:

[voucherlist category=3 preview=true]

Voucher Form

And you can also show the form for people to enter their name and email address if they wish to register for a restricted voucher:

[voucherform id=”123″]

The shortcodes for each voucher can be found at the top of the edit screen for that voucher.

Was this article helpful to you? Yes No

How can we help?