DOCS

QR Code

FREE block. Generates a QR code image for the current action’s URL, with an optional download button.

Qr code example

Why use this

A QR code makes sharing a fundraiser offline easy. Print it on flyers, event materials, or social media graphics so people can scan directly to the donation page.

What it does

The block generates a QR code server-side using Get_Fund_QR_Generator::get_cached() and outputs it as a base64 PNG data URI inside an tag. The default URL is get_permalink() of the current action. A custom URL can override this. When customUrl is set, the URL is displayed as text below the image.

The optional download button triggers a client-side download of the PNG. It can be styled as a button or a text link.

This block does not support Query Loop context.

How to use it

  1. Add the QR Code block to an action page template.
  2. Leave Custom URL blank to use the action’s permalink automatically.
  3. Toggle the download button and choose its style.
  4. Set size, border radius, and button colors in the inspector.

Settings and options

OptionTypeDefaultDescription
Custom URLstringOverride the QR code target URL
Sizenumber256QR image dimensions in pixels
Show download buttonbooleantrueDisplay a download button below the image
Download button textstringDownload QR CodeButton label
Download button stylestringbuttonbutton or text
Button colorstringButton background (button style)
Button text colorstringButton text (button style)
Button hover colorstringButton hover background
Text link colorstringLink color (text style)
Text link hover colorstringLink hover color (text style)
Button sizestringmediumsmall, medium, or large
Border radiusnumber4Button corner rounding
Rounded buttonbooleanfalsePill-shaped button
Text weightstring500Download text font weight
Underline heightnumber2Underline thickness (text style)

What you can and cannot do

  • The QR code is cached server-side; it is not regenerated on every page load.
  • The block does not expose an output filter.
  • The block does not support Query Loop context.

Troubleshooting

QR code does not scan correctly: If a custom URL was entered, verify it is a fully qualified URL starting with https://.

Download button downloads a broken file: The data URI is generated server-side. If PHP memory is constrained, the image generation may fail silently.