← Back to help center

Shortcodes

GiveFlow provides two shortcodes for embedding donation forms and the donor portal on your site. Use these shortcodes in any page or post where the block editor is not available.

Donation form

[giveflow_donation_form slug="your-form-slug"]

Renders a donation form on the page.

Parameters

Parameter Required Description
slug Yes The slug of the donation form to display

Requirements

  • The donation form must be published.
  • The campaign linked to the form must be published and, if it has a schedule, currently open.

If either of those is not true, the shortcode outputs nothing. If you leave the slug off, or the slug matches no form, it shows a short error message, but only to users who can manage GiveFlow. Visitors see nothing.

Example

To embed a form with the slug annual-appeal:

[giveflow_donation_form slug="annual-appeal"]

You can find a form’s slug in the form builder under the form settings.

Donor portal

[giveflow_donor_portal]

Renders the donor portal single-page application. The portal gives donors a self-service dashboard where they can view their donation history, manage recurring donations, and update their details.

Parameters

This shortcode takes no parameters.

Requirements

  • GiveFlow creates a published Donor portal page at /donor-portal/ and puts this shortcode in it for you.
  • You only need the shortcode yourself if you want the portal on a page of your own.

Example

To place the donor portal on a custom page:

[giveflow_donor_portal]

Create a new WordPress page, add this shortcode to the content, and publish the page. The portal renders wherever the shortcode is.

GiveFlow keeps linking to the page it provisioned, so the sign-in link email and the failed recurring payment notice still point there. To send donors to your page instead, a developer can override the address with the giveflow.portal.url filter. See Developer hooks.

Notes

  • Both shortcodes work in the classic editor, page builders, and any context that processes WordPress shortcodes.
  • In the block editor there is a Donation form block. It is bound to a campaign rather than a form slug, renders that campaign’s default form, and previews it live on the canvas. The donor portal has no block, so use the shortcode.