Skip to content

Unified passive display templates

Last updated on June 8, 2026

This session focused on standardizing how passive display sections (lyrics, excerpts, quotes) render across different CPTs, ensuring consistent layout, image logic, and metadata display. Each block now follows a clean, reusable structure with smart fallbacks and clear “Source” labeling.

Unified lyric display

  • Created a lyric-list-section template that gracefully handles both WP_Query and array input.
  • Added fallback logic for cover images (song cover → thumbnail → post thumbnail).
  • Implemented conditional “Source” display that links to the related song.
  • Trimmed lyrics to 80 words for balance while keeping styling consistent with excerpt/quote layouts.

Unified excerpt display (books only)

  • Built a dedicated excerpt-list-section template limited to book excerpts.
  • Used excerpt_source ACF relation to pull book info and display “Author” confidently since all excerpts are tied to Book CPTs.
  • Standardized image hierarchy: cover → featured → fallback.
  • Matched layout and text handling to lyric style for visual parity.

Unified quote display (books only)

  • Added quote-list-section template to mirror excerpt behavior but using quote_source.
  • Consistent image logic and link structure with excerpts.
  • Trimmed displayed quote text to 40 words for balance within grids.
  • “from [Book Title]” format used for attributions for a more literary tone.

Content handling discussion – lyric text formatting

  • Reviewed why lyric lines often lack punctuation (since they’re displayed as raw multiline text).
  • Considered inserting commas for soft line breaks and dashes for natural pauses to make text cleaner in grids.
  • Decided to potentially preprocess or lightly edit lyric text fields to preserve readability while keeping cover blocks unaffected.

Overall: All three passive display templates are now standardized, modular, and stylistically aligned — setting a clean foundation for future content refinement and formatting automation.