Newsletter Configuration
Configure newsletter cards, sub-preferences, placement, consent checkboxes, and the preference center.
The Newsletter module ships two surfaces: a signup form for anonymous visitors, and a preference center for signed-in users to manage their subscriptions. This article covers the configuration under Unidy → Newsletter.
Cards
A card represents one newsletter product visible to the visitor. Under Cards you define:
- Internal name — a machine-readable identifier (e.g.
club_news). Used in URLs and analytics; not shown to the visitor. - Display name — the human-readable label (e.g.
Club News). - Description — a short subtitle explaining what the newsletter is about.
- Badge (optional) — a small accent label rendered on the card (e.g.
Weekly,VIP). - Has sub-preferences — toggle if this newsletter supports finer-grained topic selection.
Use the up/down controls to order cards and preferences.
Cards are rendered as toggle-switch rows in the signup form and as manage-subscription rows in the preference center.
Sub-preferences
When a card has sub-preferences enabled, you can add checkboxes underneath it for topic-level opt-in. Under Sub-preferences:
- Belongs to card — pick the parent card.
- Backend identifier — a machine name (e.g.
player_news_pref). - Label — the human-readable checkbox label.
- Default (pre-selected when the visitor subscribes) — check to make this an opt-out preference. Uncheck for classic opt-in behavior.
Placement
Under Placement you decide where the signup form appears:
- Shortcode snippet:
[unidy_newsletter]— paste into any page or post. - Limit to card (optional): restrict a specific shortcode to one card only, useful when a landing page focuses on a single newsletter.
- Style override:
cards,inline, orcompact. Omit the attribute to use the configured default; combinecardwithcompactfor a focused signup. - Intro block: set
intro="no"to hide the intro title and text for that placement. Configure shared copy under Intro copy. - Auto-inject on homepage: appends the signup form automatically at the end of your homepage. Useful when you don't want to touch the page content directly.
Signed-in behaviour
When a signed-in visitor lands on a page containing [unidy_newsletter], one of four things can happen (configured under Signed-in behaviour):
- Show preference center inline (recommended) — the signup form transforms into the manage-subscription view on the same page.
- Show success message + link — a short confirmation with a link to a dedicated preference-center page.
- Show identified email + link — compact display showing which email is registered, plus a link.
- Hide entirely — the shortcode renders nothing.
Text customization
Under Text customisation you can override the microcopy for the success flash message, the double-opt-in banner, the resend-DOI button, and the fallback text shown to visitors who haven't confirmed their email yet.
Consent checkboxes
Above the Abonnieren button on the signup form, you can add one or more legally-required consent checkboxes. Under Consent checkboxes:
- Key — a machine identifier (e.g.
datenschutz). - Text — the checkbox label. Supports HTML anchors, so you can embed links to your privacy policy:
Ich stimme <a href="/datenschutz">der Datenschutzerklärung</a> zu.
All consent checkboxes are required — the Abonnieren button stays disabled until every one is checked.
Preference Center
The preference center is a standalone view for signed-in visitors to manage their subscriptions. Configuration:
- Render mode: inline, modal, or panel.
- Trigger URL patterns: which links (e.g.
/newsletter/,/mein-newsletter) open the panel or modal. - Header text: what appears at the top of the preference center.
- Container selector: an additional selector whose links open the surface; href-pattern matches also work outside it. Leave it blank for patterns only.
The preference center is rendered via [unidy_newsletter_preferences] — see the Shortcode Reference.
Placement tools and preference-center links
Defaults & auto-placement sets the default shortcode style when no explicit style is present. Pages using this shortcode → Refresh lists placements with Edit and View links. The shortcode's card value uses the card's internal name; leaving it blank includes all cards.
Preference-center trigger patterns are case-insensitive regular expressions, such as /newsletter(/|$), /abonnements(/|$), and /meine-newsletter(/|$). Add a label + URL menu item under Auth to expose a matching route in the user menu. Overlay placement is independent of the signup form and does not require the standalone preference shortcode.
For a customer-side companion plugin that maintains menu items in code, the supported filter is:
add_filter('unidy_sdk_user_menu_items', function ($items) {
$items[] = ['label' => 'Newsletter', 'href' => '/newsletter/'];
return $items;
});The signed-in inline preference center shows the identified email, current subscriptions, subscribe/unsubscribe actions, double-opt-in state, and enabled topic preferences. Keep newsletter consent and the selected topic defaults aligned with the approved subscription process.