Skip to content

Song CPT & server optimization

Last updated on June 6, 2026

This week marked a major step forward in integrating multimedia and artist metadata across the Songs Featured CPT, along with backend upgrades and architectural planning for images, organizations, and quotes.

Song CPT enhancements & embedded media fixes

  • Implemented full support for Featured, Secondary, Tertiary, and Quaternary Artists using custom ACF fields.
  • Updated the [referenced_works] shortcode to display each featured artist on its own line, preserving manual order.
  • Created a new ACF field youtube_url for songs, allowing direct YouTube embeds.
  • Solved a persistent embed rendering issue by switching all Song CPTs to use the native block editor (show_in_rest => true), enabling proper YouTube centering and layout control without extra wrappers or hacks.
  • Final video centering was handled within the block editor’s native structure, ensuring consistency across song and chapter templates.

Server stack, caching, and PHP optimization

A backend upgrade was completed to improve performance and long‑term maintainability:

  • PHP updated to 8.2.28, including performance enhancements via Zend OPcache.
  • Installed all recommended PHP modules (intl, imagick, etc.) for WordPress compatibility.
  • Evaluated Redis but decided not to implement object caching yet due to server constraints (1 GB RAM / 1 CPU VPS). Instead:
    • Leaned into lightweight caching options (FastCGI or Cache Enabler).
    • Reconfirmed Cloudflare is active and acting as the CDN/frontline cache.
  • Verified response times under 300ms, hardened the PHP environment, and documented a future‑proof configuration baseline.

Image gallery strategy & narrative media architecture

Initial planning was completed for a full‑featured narrative image gallery system that treats images as a storytelling layer:

  • Outlined a multi‑layer system: from “Master Gallery” to “Tagged Images” to “Used in CPTs.”
  • Confirmed that images will remain Media Library attachments, enhanced with ACF fields and taxonomies instead of being their own CPT.
  • Planned fields for images: featured_image_in_gallery (ACF toggle), gallery_caption, image_type (symbolic, aesthetic, etc.), related_chapter, related_concept, and more.
  • Image themes will use the existing non‑hierarchical theme taxonomy for symbolic linking across media.
  • Determined the gallery’s front‑end page (/image-gallery/) will query and display featured images with filtering by theme or related CPT.

New “Organization” CPT for institutional entities

To resolve longstanding ambiguity around non‑personal references:

  • Created a new organization CPT to represent entities like institutions, NGOs, conferences, and foundations.
  • Chose “organization” (over “entity”) for its clarity and plural‑form usability.
  • Built out full ACF integration: Wikipedia slug with importable excerpt, custom bio, cover image, and relationships to people, concepts, chapters, and other organizations.
  • Updated the [referenced_works] shortcode to support organizations with square thumbnails (styled like books) and alphabetized display under a new “Organizations Referenced” section.

Dynamic quote rendering with ACF + cover blocks

Refined quote display options to reduce repetitive block code entry:

  • Developed a fallback system for auto‑generating cover blocks using plain text ACF fields (quote_text), rendered with do_blocks() if no custom block code is provided.
  • Planned a transition away from raw cover block code stored in ACF to a pattern‑based system using WordPress Synced Patterns. This ensures centralized design control: when a quote pattern is updated, all instances reflect the change.
  • Long‑term strategy includes optionally storing the pattern slug in ACF (quote_pattern_slug) and rendering it dynamically using a core/pattern block fallback.