benecaster_donor_wall_empty_message
Fires when the donor wall’s donation query returns zero rows. Receives the fully-wrapped default empty-state HTML — a .benecaster-donor-wall--empty wrapper containing a .benecaster-donor-wall__empty-message element — as $html.
Return any string to replace the empty state entirely. Return $html unchanged to keep the default. Branch on $show_id when only specific shows should use the custom empty state.
The empty state fires whenever the filtered query returns zero rows — including when benecaster_donor_wall_query_args narrows the platform to one that has no donations yet. Design your custom message with that possibility in mind (e.g. “No Stripe donations yet” rather than “No donations yet” if you’re also scoping the query).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$html |
string |
— | The default empty-state HTML, fully wrapped in `.benecaster-donor-wall--empty`. |
$show_id |
int |
— | WordPress post ID of the show whose wall returned zero rows. |
Returns:
string
Examples
Replace with a custom CTA block
add_filter( 'benecaster_donor_wall_empty_message', function ( string $html, int $show_id ): string {
return sprintf(
'<div class="my-empty-wall"><h3>%s</h3><a href="%s">%s</a></div>',
esc_html__( 'Be the first supporter', 'my-theme' ),
esc_url( home_url( '/support-the-show/' ) ),
esc_html__( 'Tip the show', 'my-theme' )
);
}, 10, 2 );
Need this built rather than just documented? See our services →