Charitable Documentation

Learn how to make the most of Charitable with clear, step-by-step instructions.

Disable the Auto-Created Single Campaign Page

When you create a campaign in Charitable, WordPress automatically gives it its own public URL at /campaigns/[campaign-slug]/. That happens because Charitable registers campaigns as a public custom post type, which is what allows search engines and direct links to reach a campaign’s own page.

That works well if you want every campaign to have its own landing page. But if you only want donors to reach your campaign through a specific page on your site, for example a single /donate/ page where you’ve embedded the campaign with the shortcode or block, the auto-created URL becomes a second, unwanted entry point.

This page covers two ways to remove that entry point. Both options leave your campaign embed working exactly as before, because the embed reads the campaign record directly from the database. It does not rely on the single campaign URL being publicly accessible.

When you’d use this

  • You embed your campaign on a dedicated donate page and want that to be the only place donors land.
  • A campaign URL is showing up in search results or being shared, and you want to send those visitors to your donate page instead.
  • You only run one campaign at a time and the single-campaign URL is redundant.

Why the URL exists in the first place

Charitable registers campaign as a WordPress custom post type with public => true and publicly_queryable => true. Those two flags are what tell WordPress to generate a URL for each campaign and serve it through the single-post template.

The URL pattern is [your-permalink-front]/campaigns/[campaign-slug]/. If your WordPress permalink structure has a front, for example /news/%postname%/, the campaign URL becomes /news/campaigns/[campaign-slug]/. That’s standard WordPress behavior, not a Charitable setting.

There’s no built-in toggle in the Charitable settings to disable the single campaign URL. The two snippets below are the supported ways to turn it off.

Option 1: Redirect single campaign URLs to your donate page (recommended)

This is the option to choose if there’s any chance a campaign URL has already been shared, indexed, or linked from elsewhere. Visitors who land on the campaign URL get sent to your donate page with a 301 redirect, which search engines respect over time.

Add this snippet using a code snippets plugin (such as WPCode) or your child theme’s functions.php:

add_action( 'template_redirect', function() {
    if ( is_singular( 'campaign' ) ) {
        wp_safe_redirect( home_url( '/donate/' ), 301 );
        exit;
    }
} );

Change /donate/ to whatever URL you want to send visitors to. After saving the snippet, open your campaign’s URL in a private browser window to confirm it now lands on your donate page.

Option 2: Make the campaign post type non-public

This option turns off the single campaign URL entirely. Anyone visiting /campaigns/[slug]/ will see a standard WordPress 404. Use this if you’d rather the URL not exist at all than redirect.

Add this snippet using a code snippets plugin or your child theme’s functions.php:

add_filter( 'charitable_campaign_post_type', function( $args ) {
    $args['public']              = false;
    $args['publicly_queryable']  = false;
    $args['exclude_from_search'] = true;
    return $args;
} );

After adding the snippet, flush your permalinks: go to Settings > Permalinks in your WordPress admin and click Save Changes. You don’t need to change anything on that screen. The act of saving regenerates the rewrite rules so the campaign URL stops resolving.

What happens to the campaign embed

Both options leave the campaign embed untouched:

  • The [charitable_campaign] shortcode keeps rendering on your donate page.
  • The Charitable campaign block keeps rendering on your donate page.
  • The campaign’s title, story, goal, and donation form all keep loading.
  • New donations still attach to the campaign and update its progress.

The embed reads the campaign post directly by ID, so it doesn’t matter whether the campaign’s own URL is public, redirected, or returning a 404.

Which option should you pick?

Use Option 1 (redirect) if…Use Option 2 (non-public) if…
A campaign URL might already be shared, indexed, or linked from somewhere.The campaign URL has never been shared and isn’t in search results.
You want a graceful handoff for any visitor who finds the old URL.You’d prefer the URL not to resolve at all.
You want search engines to follow the 301 and drop the old URL over time.You don’t care about preserving the URL’s search presence.

In most cases, Option 1 is the safer choice because it handles both new visitors and anyone who already has the URL.

Frequently asked questions

Will this affect how donations are tracked?

No. Donations are attached to the campaign record itself, not the URL. Whether someone donates through your embedded form on /donate/ or (before the redirect) the auto-created campaign page, the donation lands on the same campaign and counts toward the same goal.

Does this remove the campaign from the WordPress admin?

No. The campaign still shows up in Charitable > Campaigns in your admin. You can edit it, archive it, see its donations, and so on. Only the public URL changes.

Can I do this for one campaign but not others?

Yes – narrow the redirect by checking the specific campaign ID:

add_action( 'template_redirect', function() {
    if ( is_singular( 'campaign' ) && get_queried_object_id() === 123 ) {
        wp_safe_redirect( home_url( '/donate/' ), 301 );
        exit;
    }
} );

Replace 123 with the ID of the campaign you want to redirect. Other campaigns will continue to use their normal URLs. (Option 2 is all-or-nothing because it changes the post type registration.)

What about the campaign archive page?

Charitable already has the campaign archive turned off (has_archive => false), so visiting /campaigns/ on its own doesn’t render a Charitable archive. You don’t need to do anything extra to disable it.


Developer reference

The rest of this page is for developers who want more control over the campaign post type registration.

The filter

charitable_campaign_post_type runs on init (priority 5) just before register_post_type() is called. It receives the full arguments array used to register the campaign post type, so you can change any of these:

ArgumentDefaultEffect
publictrueMaster switch for front-end visibility and admin UI.
publicly_queryabletrueWhether /campaigns/[slug]/resolves to a single template.
exclude_from_searchfalseWhether /?s= searches include campaigns.
has_archivefalseThe campaign archive is already off by default.
rewritearray( 'slug' => 'campaigns', 'with_front' => true )The URL slug for single campaigns.
show_in_nav_menustrueWhether campaigns can be added to nav menus from Appearance > Menus.

Changing the URL slug instead of disabling it

If you’d rather keep the single campaign page but change its URL prefix, filter the rewrite slug. For example, to change /campaigns/[slug]/ to /fundraise/[slug]/:

add_filter( 'charitable_campaign_post_type', function( $args ) {
    $args['rewrite']['slug'] = 'fundraise';
    return $args;
} );

Flush permalinks after the change (Settings > Permalinks > Save Changes).

Why with_front matters

The default 'with_front' => true means WordPress prepends your permalink front to the campaign URL. If your WordPress permalink structure is /news/%postname%/, your campaign URLs will be /news/campaigns/[slug]/. Set 'with_front' => false to ignore the permalink front:

add_filter( 'charitable_campaign_post_type', function( $args ) {
    $args['rewrite']['with_front'] = false;
    return $args;
} );

Flush permalinks after the change.

How the embed keeps working

The [charitable_campaign] shortcode and the campaign block both resolve to Charitable_Campaign queries that load the post by ID. Those queries use get_post() and direct meta lookups, which are independent of the public and publicly_queryable flags. The flags only control whether the WordPress front-end controller will route a request to the single campaign template. Disabling them does not block PHP code from reading the post.

Hook reference

HookTypeUse it to
charitable_campaign_post_typeFilterModify the arguments passed to register_post_type() for campaigns. Runs on init priority 5.
template_redirectActionFire your redirect after WordPress has parsed the request and chosen a template, but before the template is loaded. Standard WordPress hook.
is_singular( 'campaign' )ConditionalTrue when the current request is a single campaign URL. Use it inside template_redirect to scope the redirect.

Still have questions? We’re here to help!

Last Modified:

What's New In Charitable

View The Latest Updates
🔔 Subscribe to get our latest updates
📧 Subscribe to Emails

Email Subscription

Join our Newsletter

We won’t spam you. We only send an email when we think it will genuinely help you. Unsubscribe at any time!

GiveWP Migrations New

White Glove Migration Service for GiveWP

Thinking about switching your fundraising platform from GiveWP to Charitable, but don’t want to risk losing your data or handle a complex technical setup yourself? Charitable’s White Glove Migration Service features:

👥 Flawless Donor Mapping: Safely transfer your entire supporter database with zero data loss.

📊 Complete Financial History: Meticulously preserve every historical transaction for continuous, accurate reporting.

🔄 Seamless Recurring Giving: Safely transfer active sustaining subscriptions without disrupting your incoming revenue or requiring your donors to update their information.

💳 Zero Gateway Disruptions: Keep using Stripe, PayPal, or any other GiveWP-compatible processor you already love.

🚀 Expert Technical Setup: Relax while our team handles the heavy lifting to install and configure your forms—plus, qualifying users get a full year of Charitable Pro completely free.

Visit this page to learn more.

automation Improvement

📢 New Feature Alert: Automation Connect 2.0 Is Here! 🚀

Thinking about connecting your fundraising data to tools like Mailchimp, Slack, or Google Sheets, but don’t want to hire a developer or write custom code? Charitalbe’s new automation addon has:

⚡ 17 Event Triggers: Instantly fire webhooks for a donor’s first gift, renewal payments, or reached campaign milestones.

🎯 Smart Conditional Logic: Use powerful AND/OR logic across 11 fields to only send data when it meets your exact criteria, like newsletter opt-ins.

📊 Custom Payload Control: Select from 80+ clean data fields across donor, donation, and campaign metadata so your apps get exactly what they need.

🚀 Pre-Built Platform Templates: Skip the setup from scratch with ready-to-go templates for Zapier, Make.com, n8n, HubSpot, and Slack.

🛡️ Reliable Developer Tools: Power your workflows with signed HMAC-SHA256 payloads, complete WordPress filters, and automatic retry logs.

automation Improvement

🔌 Charitable Meets Zapier: Connect to 7,000+ Apps and Automate Your Fundraising

Tired of manually copying donation data into accounting sheets or tracking down new donor signups? Put your administrative tasks on autopilot. Charitable is now officially on Zapier, giving you a powerful, no-code way to plug your fundraising directly into the rest of your favorite tools.

Every donation, donor signup, and campaign milestone can now trigger an automated workflow seamlessly.

What’s New:

♾️ Connect to 7,000+ Apps: Bridge your Charitable campaigns with everyday software like Google Sheets, QuickBooks, Slack, Mailchimp, HubSpot, Notion, Airtable, and thousands more.

⚡ 12 Powerful Triggers: Build deep workflows using smart automation triggers covering the entire donation lifecycle—including New Donation, New Donor, Subscription Cancelled, and Campaign Goal Reached.

📋 Pre-Built Action Templates: Get started in three minutes or less with our pre-made template combinations, like automatically logging new donations straight into a Google Sheet or firing custom donor welcome emails through Gmail.

🚫 Zero Code Needed: No complex webhooks or custom PHP scripts required. Just pick your trigger, choose your app, map your fields, and let Zapier handle the heavy lifting.

Ready to save hours of admin time? Grab Charitable Pro with the Automation Connect addon today and launch your first Zap!

Improvement Payments

🚀 Introducing PayPal Commerce: One Connection, Six Ways to Donate

Donors expect modern, flexible payment options when they support a cause. If they don’t see their preferred method on your donation form, they often disappear without a word. With PayPal Commerce, we are bringing a completely modernized checkout experience right to your campaigns.

Enjoy a single integration that upgrades your forms, makes giving seamless, and helps you capture every single donation.

What’s New:

🔌 One-Click Connection: Skip messy API keys and developer docs. Simply click “Connect with PayPal,” sign in to your business account, and your modern form is live in under five minutes.

💳 Six Ways to Give: Give your supporters instant access to PayPal balance, Venmo (US), Pay Later financing, major credit/debit cards, Apple Pay (Safari), and Google Pay (Chrome) all from the exact same form.

🔄 Flexible Recurring Giving: Fully supports monthly giving. Choose between the PayPal Subscriptions API (handled automatically on PayPal’s end) or Vault + Cron (handled securely right on your site).

💬 Friendly Error Recovery: No more confusing browser alerts. If a payment is declined, donors see plain-language, inline messages that guide them on how to fix the issue and complete their gift.

Ready for PayPal, modernized? Update to Charitable Pro 1.8.15+ (or Charitable Lite 1.8.11+) and connect your account today!

Campaigns New

⏳ Campaign Countdown: Drive Urgency and Lift Donations

Urgency is one of the most powerful tools in fundraising! Meet Campaign Countdown—a live, real-time timer built to turn procrastination into immediate generosity.

campaign_countdown_animation

What’s New:

⏱️ Live, Real-Time Urgency: Beautifully track days, hours, minutes, and seconds down to your campaign’s deadline w/ live-updating visual countdowns.

🎨 Tailored to Your Look: Choose between Boxed bordered tiles or a clean, single-line Inline display. Match your theme instantly with font and deep color controls.

🛠️ Place it Anywhere: Drop the countdown anywhere you like using the Campaign Builder field, a dedicated Gutenberg block, or a simple shortcode.

🚨 Smart Expiry Actions: Total control over the end state—choose to automatically replace the timer with a custom message, freeze it at zero, and more.