Guide

Staff Bylines architecture

includes/class-content-type.php registers the staff CPT and bylines, areas-of-expertise, and staff-type taxonomies. Term Data Store binds each staff post to a bylines term.

Content objects

ObjectSlugNotes
Post typestaffPublic, REST-enabled, no archive
TaxonomybylinesRewrite /staff/{slug}; applied to prc-bylines post types
Taxonomyareas-of-expertiseHierarchical; staff only
Taxonomystaff-typeDistinguishes current vs former staff

Data accessors

Staff resolves a person from a post ID or bylines term ID, with object-cache hydration (staff_data group, 1-hour TTL) for unauthenticated requests. Guest terms without a linked staff post use set_guest().

Bylines loads ordered bylines for a post and formats them as array, string, or html.

REST fields

includes/class-rest-api.php registers a staffInfo field on bylines terms and staff posts via register_rest_field. Ordered bylines meta fields are also exposed for RTC. There is no custom REST namespace.

The staff collection accepts orderby=last_name.

Maelstrom

On prc_platform_on_publish, includes/class-maelstrom.php can strip bylines when a staff member's _maelstrom.restricted region/country list overlaps the post's regions-countries terms. Treat this as an internal safety net; do not document operational details beyond the meta shape in the plugin README.

SEO and archives

  • Yoast hooks replace author meta with the bylines string when Yoast is active.
  • bylineLinkEnabled = false adds noindex/nofollow on that term archive.
  • Native author archives 404; bylines term archives are canonical.
  • prc_sitemap_supported_taxonomies opts bylines into XML sitemaps.

WP-CLI

wp prc bylines guest-authors create --first=<first> --last=<last> [--middle=<middle>] [--dry-run]

Dependencies

  • prc-platform-core (required)
  • prc/term-data-store (PRC\TDS)
  • Yoast SEO (optional; SEO class is conditional)

Was this helpful?