benecaster_guest_manager_guest_output
Filters the HTML of the benecaster_guest shortcode: one guest’s card, div.benecaster-guest-card. Not called when Guest Manager is not running or the guest does not exist or is not published.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$html |
string |
— | The card's HTML |
$guest_id |
int |
— | The guest |
$atts |
array |
— | The shortcode's attributes after defaults: `guest`, `bio`, `photo`, `links` |
Returns:
string
Example
// Wrap each card in a figure of your own.
add_filter( 'benecaster_guest_manager_guest_output', function ( string $html, int $guest_id, array $atts ): string {
return '<figure class="my-guest-card" data-guest="' . esc_attr( (string) $guest_id ) . '">' . $html . '</figure>';
}, 10, 3 );
Notes
The returned HTML is printed as is: escape anything you add. Walkthrough: Place guests anywhere with Guest Manager's shortcodes.
Affects
- [benecaster_guest] shortcode
Need this built rather than just documented? See our services →