How to add a donation form to Charity Hub

Charity Hub's Donate Now button can open any URL instead of its built-in form, which makes moving causes to Donor Merchant a per-cause change.

Short answerCharity Hub takes cause donations through its own PayPal and Stripe form, set up with a [gdlr_paypal] shortcode. To use Donor Merchant instead, create a page with [donor_merchant campaign="3"] for each cause, then paste that page's URL into the cause's donation form field. GoodLayers documents that the Donate Now button then opens your URL instead of the built-in form.

What does Charity Hub ship for donations?

Charity Hub, by GoodLayers, adds a Cause post type through its Goodlayers Cause plugin. Each cause has its own options area, and the page builder has items for showing causes: Cause, Cause Search, Urgent Cause and a Post / Cause Slider. The ThemeForest listing describes a donation system via PayPal and via Stripe that turns money received into a percentage bar on each cause and emails the donor a confirmation.

The theme documentation sets this up in one field. Under the theme options' Cause Style section (GoodLayers' support articles reach it as Charity Hub > Cause Style), or on an individual cause, you fill the donation form field with a [gdlr_paypal] shortcode. That shortcode holds your PayPal user, PayPal's form address, optional Stripe keys and currency, and the preset amounts shown in the Donate Now popup. For PayPal, the documentation then has you turn on Instant Payment Notifications in your PayPal profile, pointing at your site's URL with ?paypal added, so each cause's funding total updates.

About the PayPal halfThe documented PayPal setup posts to paypal.com/cgi-bin/webscr and records gifts through IPN. Those belong to PayPal's Website Payments Standard system, which PayPal has deprecated. Our guide to PayPal's Website Payments Standard changes explains the dates and how to check your own site. Donor Merchant uses PayPal's current Orders and Subscriptions APIs with signed webhooks.

How do I add the Donor Merchant form?

  1. Install Donor Merchant from Plugins > Add New (search "Donor Merchant"). It needs WordPress 6.2 or later, PHP 7.4 or later, and HTTPS.
  2. Connect Stripe, PayPal, or both.
  3. For each cause, create a campaign with the same goal under Donor Merchant > Campaigns.
  4. Create a page for each campaign and paste [donor_merchant campaign="3"] into the page content, using that campaign's ID. GoodLayers' documentation says shortcodes can go in any content or text area. In the block editor, put the shortcode in a Shortcode block; the Donation Form block has no campaign setting.
  5. Publish and make a test donation with your gateway in test mode.

Donor Merchant > Settings > Shortcodes lists your campaign IDs. A campaign form shows its own goal bar, and [donor_merchant_progress campaign="3"] shows the thermometer anywhere else. See campaigns and goal thermometers.

How do I point a cause's Donate Now button at the new form?

GoodLayers has a support article for this. Edit the cause, and in the cause's donation form field, replace the shortcode with the full URL of the cause's new donation page. Save the cause. The Donate Now button now opens that page instead of the theme's donation popup.

The article describes this for individual causes. The same donation form field also exists globally under Cause Style; the documentation does not say whether a URL works there, so change one cause, test it, then work through the rest.

We recommend this link over pasting [donor_merchant] into the theme's popup field. That field is documented for the theme's own shortcode, and we have not tested Donor Merchant inside the popup. A page also gives each cause a donation address you can share.

Keeping the cause progress bar accurate

The theme raises each cause's current funding figure from its own PayPal notifications, so gifts made through Donor Merchant will not move it. The documentation notes that a number you type in the cause info overrides the figure set by PayPal. You can update that number by hand, or show a live figure instead by adding [donor_merchant_progress campaign="3"] to the cause's content.

How do I add a Donate button to the Charity Hub header?

Menus are built in Appearance > Menus and assigned to the theme's location under Manage Locations. Add a Custom Link to your main donation page, label it "Donate", and save.

If you use header style 2, the theme also has a Logo Right Text option next to the logo, under the theme options' Overall Elements > Header / Logo section. The documentation says it accepts shortcode, HTML or JavaScript, so a plain HTML link to your donation page works there as a header button. Use a menu item if you are on another header style.

What happens to past donations?

The Charity Hub documentation describes the theme updating each cause's funding total and emailing the donor. It does not describe a donor list or an export. The transaction history is in your PayPal and Stripe accounts. Download it from there as CSV, and Donor Merchant > Import accepts PayPal and Stripe CSV files. It lets you confirm the column mapping, previews before writing anything, and never emails donors about old gifts.

If you ran recurring gifts through any other plugin, those subscriptions stay with it, so keep it installed until they are dealt with. The full procedure is in migrating a donation plugin without losing donor history.

Are there performance settings to change?

The Charity Hub documentation does not describe options for minifying, combining or delaying scripts. If you use an optimization plugin that delays or combines JavaScript and the payment fields do not appear, exclude js.stripe.com, www.paypal.com/sdk/js and wp-content/plugins/donor-merchant/assets/js/donor-merchant.js, or turn that option off for donation pages. Page caching is fine: the form has no nonce, and the donor portal and receipt links send no-cache headers themselves. Details for each caching plugin are in our page cache exclusions guide.

How do I match the form to Charity Hub's colors?

Charity Hub's documentation gives two places for the theme color: the theme options, or Appearance > Customizer, which previews changes as you make them. Copy the main color's hex code, then go to Donor Merchant > Settings > Forms > Form style, choose the custom color, paste it, and pick the button shape (pill, rounded or sharp) closest to the theme's buttons. The card fields are drawn by Stripe in a secure frame, so theme CSS cannot change them; check the other fields and buttons on the live page.

What should I test?

  • Every cause's Donate Now button, after you change its field.
  • A test donation on desktop and phone.
  • Webhooks, if you offer recurring giving through Donor Merchant.

Checked against Charity Hub's documentation and GoodLayers' support articles in October 2026. Theme menus change between versions, and parts of the Charity Hub documentation date from earlier releases; if a label differs in yours, look for the equivalent option.

Sources

Get Donor Merchant

Free from WordPress.org, with recurring giving included.

Download Donor Merchant free Or try the demo first.