Skip to main content

[benecaster_guest]

guest-manager

One guest’s card: photo, name linking to their guest page, Title, Organization, bio, and their website and social links. Registered by the Guest Manager add-on. A guest belongs to no show, so the card draws whenever Guest Manager is switched on for at least one show. It draws nothing for a guest that does not exist or is not published.

It never prints itself. The tag is registered on every request, so a page never shows it as text; it draws nothing unless Guest Manager is switched on for at least one show. Test for it with shortcode_exists(). The Blocks & Widgets add-on wraps it as a block and an Elementor widget.

Switches read false, 0, no and off as false and anything else as true.

Customizing the card. Both ways work, and they can be combined:

  • Override the template. Copy Guest Manager’s templates/guest/card.php to {theme}/benecaster/guest/card.php and edit the copy; see Template Overrides. It receives $card, holding guest_id, name, url, title_line, photo_url, bio (plain text for an excerpt, HTML for the full bio, '' for none), bio_is_html, website and social.

  • Filter the HTML. benecaster_guest_manager_guest_output ( string $html, int $guest_id, array $atts ) receives the finished card, to wrap or replace.

Walkthrough: Place guests anywhere with Guest Manager’s shortcodes.

Parameters

Name Type Default Required Description
guest string — Yes The guest: their slug, as in /guests/{slug}/, or their post id.
bio string excerpt No excerpt shows the first 30 words as plain text. full shows the whole bio with its paragraphs. none shows no bio. Anything else reads as excerpt.
photo bool true No Shows the guest's photo, 96 × 96.
links bool true No Shows the guest's website link and social links, each opening in a new tab.
publications bool false No Shows the guest's publications after the links, drawn by the guest/publications.php template, with the affiliate line when one is an affiliate link.

Example

<!-- A guest's card by slug -->
[benecaster_guest guest="ada-lovelace"]

<!-- By post id, without the bio or links -->
[benecaster_guest guest="381" bio="none" links="false"]