DOCS

Share Modal

PRO block. A button that opens a modal with social sharing options for the current action. Block ID: get-fund/share.

Share modal example

Why use this

Sharing is a primary growth mechanism for peer-to-peer fundraising. A prominent, easy-to-use share button reduces friction and increases the reach of each action.

What it does

The block renders a button. When clicked, a modal opens with sharing options for:

  • Facebook
  • Twitter / X
  • WhatsApp
  • LinkedIn
  • Email
  • Copy link to clipboard
  • Facebook Messenger (requires an app ID configured via filter)

The share URL defaults to the current action’s permalink. The share message defaults to the action title. Both can be overridden via block attributes or filters.

The block supports Query Loop context.

Requirements

  • Active Fundations Pro license

How to use it

  1. Add the Share Modal block to an action page template or archive card.
  2. Customise the button text, style, and colors.
  3. Optionally enter a custom share message in the Share Message attribute.
  4. For Facebook Messenger sharing, configure the app ID using the get_fund_share_messenger_app_id filter.

Settings and options

OptionTypeDefaultDescription
Button textstringShareButton label
Modal titlestringTitle shown at the top of the modal
Modal headingstringHeading inside the modal
Modal descriptionstringDescriptive text inside the modal
Share messagestringCustom message prepended to the share link; empty uses the action title
Button sizestringlargesmall, medium, or large
Alignmentstringcenterleft, center, or right
Full widthbooleanfalseStretch button to full container width
Border radiusnumber6Button corner rounding
Is outlinebooleanfalseOutline button style
Border thicknessnumber2Outline border thickness
Border colorstring#4a9d44Outline border color
Button colorstring#4a9d44Filled button background
Button text colorstring#ffffffFilled button text
Button hover colorstring#d32f4aFilled button hover background

What you can and cannot do

  • Facebook Messenger requires a Facebook App ID. Without the filter returning an app ID, the Messenger button is not shown.
  • The block does not expose a direct link without opening the modal; there is no inline share link variant.

Developer reference

Filters

// Filter the URL used in all share links
apply_filters( 'get_fund_share_url', string $share_url, int $post_id );

// Filter the default share message
apply_filters( 'get_fund_share_message', string $share_message, int $post_id, string $share_url );

// Provide a Facebook Messenger app ID (empty string = disable Messenger button)
apply_filters( 'get_fund_share_messenger_app_id', string $app_id );

// Filter the complete array of platform share URLs
apply_filters( 'get_fund_share_urls', array $urls, string $url, string $message );
// $urls keys: facebook, twitter, whatsapp, linkedin, email, messenger

Example: enable Messenger sharing

add_filter( 'get_fund_share_messenger_app_id', function() {
    return '1234567890'; // your Facebook App ID
});

Example: add a custom share network

add_filter( 'get_fund_share_urls', function( $urls, $url, $message ) {
    $urls['bluesky'] = 'https://bsky.app/intent/compose?text=' . rawurlencode( $message . ' ' . $url );
    return $urls;
}, 10, 3 );