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!

New templates

🤩 New Beacon Campaign Templates w/ “Hero” Block!

With the new Beacon Campaign Templates for Charitable Pro, you can launch a stunning, full-width fundraising page that instantly captures visitor attention above the fold.

Fundraising page header for Save Maple Grove Park with a donation widget and a small square photo of a sunlit tree thumbnail on the left.

🔦 Above-the-Fold Impact: Lead with a full-width hero image, your logo, and your goal with a donation widget locked right on top of the banner so your ask and momentum register instantly without scrolling.

📐 Two Flexible Layouts: Choose between a structured two-column layout for side-by-side storytelling and supporting details, or a clean one-column view designed for uninterrupted long-form narratives.

⚡ All-in-One Hero Field: Powered by the new Campaign Hero field, bringing background media, live progress bars, custom donation amounts, and recurring giving tabs together into a single cohesive block that can be dropped into any layout.

🎨 Automatic Theme Matching: The hero banner and donation widget automatically inherit your campaign theme’s button and accent colors, ensuring your entire presentation stays beautifully on-brand without touching a line of CSS.

Learn more here.

donation form Feature New

📝 Donation Form Block: Embed a Working Donation Form Anywhere

With the new Donation Form Block for Charitable Pro, you can drop a fully working donation form directly onto any page or post in the WordPress block editor. No redirects, no page reloads, and zero friction between reading your story and making a contribution.

📝 Drop Forms Anywhere: Place a working form directly onto your homepage, inside a story-driven blog post, on a dedicated landing page, or within a campaign announcement.

🎯 Dynamic Campaign Binding: Easily choose a specific campaign from the block sidebar or set it to automatically bind to whichever campaign is currently being viewed.

📐 Full vs. Minimal Form Views: Switch between a full layout or a compact minimal view to perfectly fit sidebars, narrow columns, or wide landing pages.

🎨 Scoped No-Code Styling: Customize typography, container spacing, border radius, amount buttons, and accent colors independently for every form instance without touching a line of CSS.

Learn more here.

ambassadors New

👤 Creator Profiles: Put a Face to Every Peer-to-Peer Campaign

Ambassadors 3.3.0 now provies Creator Profiles — giving your supporters a permanent, shareable public home that turns one-time fundraisers into ongoing relationships.

👤 Public Creator Pages: Give every fundraiser an instant, clean landing page at /creator/their-name/ to showcase their custom avatar, bio, and a browsable grid of their campaigns.

📊 Proof of Impact: Boost donor trust by displaying site-wide milestones on the profile—like total funds raised and total donor counts.

💳 Interactive Hover Cards: When donors hover over a creator’s name on a campaign page, a compact card expands with their bio and social handles right at the moment of decision.

📍 Responsible Location Sharing: Allow creators to safely show local supporters where they are based using only city, state, and country details.

🛠️ Self-Serve Customization: Fundraisers can update their own profiles and link up to six social networks directly from the My Campaigns hub, saving you admin time.

Ready to empower your advocates? Update to Ambassadors 3.3.0 and turn on “Enable Public Creator Page” today!

Improvement Payments

📱 Turn Mobile Scrollers Into Donors: Meet Charitable’s Mollie Upgrade

Losing mobile supporters because they hate typing out long card numbers on their phones? Charitable’s updated Mollie integration features:

⚡ One-Tap Wallet Checkout: Enable donors to complete their gifts instantly using Apple Pay or Google Pay with a simple face scan, fingerprint, or tap.

💰 No Extra PCI Burden: Skip complex domain verification and security compliance since all wallet transactions run safely through Mollie’s hosted checkout.

🛠️ Custom Cancel Routing: Keep the experience predictable by automatically sending donors who back out to your cancellation page, or use developer filters to route them to a custom page.

Visit this page to learn more.

ambassadors improved New

Moderation and Directory Screens In Ambassadors 3.0

Ambassadors 3.0 has new features: moderation and directory screens… now easily see those who are earning donations on your peer to peer network – including campaign creators that might need to be verified – all in one place. Generate reports, email ambassadors and campaign creators directly and more.

🚀 See when campaign creators and ambassadors have updated their campaigns, what donors/donation they have brought in and more.

🎉 Manually add ambassadors and campaign creators, and approve them in one-click!

Visit this page to learn more.