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

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
- Add the QR Code block to an action page template.
- Leave Custom URL blank to use the action’s permalink automatically.
- Toggle the download button and choose its style.
- Set size, border radius, and button colors in the inspector.
Settings and options
| Option | Type | Default | Description |
|---|---|---|---|
| Custom URL | string | — | Override the QR code target URL |
| Size | number | 256 | QR image dimensions in pixels |
| Show download button | boolean | true | Display a download button below the image |
| Download button text | string | Download QR Code | Button label |
| Download button style | string | button | button or text |
| Button color | string | — | Button background (button style) |
| Button text color | string | — | Button text (button style) |
| Button hover color | string | — | Button hover background |
| Text link color | string | — | Link color (text style) |
| Text link hover color | string | — | Link hover color (text style) |
| Button size | string | medium | small, medium, or large |
| Border radius | number | 4 | Button corner rounding |
| Rounded button | boolean | false | Pill-shaped button |
| Text weight | string | 500 | Download text font weight |
| Underline height | number | 2 | Underline 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.