Custom Post Types
All custom post types, their data models, relationships, and how they're used across the site.
Overview
WHA has 16 custom post types, each registered by a dedicated mu-plugin in src/wp-content/mu-plugins/wha-*. The yax-model mu-plugin provides a fluent builder API for registration — each plugin defines its post type, taxonomies, and metaboxes declaratively.
Core Content Types
Providers (wha_providers)
The most complex post type. Each provider has a detail page with bio, specialties, locations, ratings, and an interactive map.
| Field | Source | Notes |
|---|---|---|
| Name, bio, photo | Post content + ACF | Standard post fields + custom fields |
| Specialties | ACF relationship | Links to wha_services |
| Locations | ACF relationship | Links to wha_locations |
| Ratings | wha_provider_ratings CPT | Synced from Doctor.com via wha-doctorcom-sync |
| NPI | ACF field | National Provider Identifier |
URL pattern: /providers/{slug}/
Listing behavior: The provider archive at /providers/ renders cards client-side via AJAX, not server-side PHP. The flow:
- Page loads with skeleton cards (
card.provider.skeleton.php) - JS fetches provider data via AJAX (
functions/api/providers.php) - Cards populate from the
card.provider.dynamic.phptemplate
Templates: single-wha_providers.php, taxonomy-post_providers.php
Locations (wha_locations)
Physical office locations with addresses, hours, phone numbers, and interactive maps.
| Field | Source | Notes |
|---|---|---|
| Address, phone, fax | ACF fields | Formatted by format_address() and format_hours() |
| Hours | ACF repeater | Day/time pairs |
| Map coordinates | ACF fields | Lat/lng for Mapbox markers |
| Associated providers | ACF relationship | Reverse lookup from providers |
URL pattern: /locations/{slug}/
Templates: single-wha_locations.php, taxonomy-post_locations.php
Services (wha_services)
Medical services and specialties offered by WHA.
| Field | Source | Notes |
|---|---|---|
| Description | Post content + ACF | Service detail content |
| Related providers | ACF relationship | Providers who offer this service |
| Life stage associations | ACF relationship | Which life stages this service applies to |
URL pattern: /services/{slug}/
Templates: single-wha_services.php, taxonomy-post_services.php
Life Stages (wha_life_stages)
Content organized by patient life stage (e.g., teens, pregnancy, menopause).
| Field | Source | Notes |
|---|---|---|
| Description | Post content + ACF | Life stage overview |
| Related services | ACF relationship | Services relevant to this life stage |
| Resources | ACF relationship | Links to wha_resources |
URL pattern: Uses custom template single-wha_life_stages.php
Templates: single-wha_life_stages.php, taxonomy-post_life_stages.php
News (wha_news)
Blog posts and news articles.
URL pattern: Archive at /news/, singles at standard WordPress permalink
Templates: archive-wha_news.php, single-wha_news.php
Supporting Content Types
Topics (wha_topics)
Health topics with associated terminology and educational content. Loaded via AJAX with tabbed content interface.
Insurance (wha_insurance)
Insurance plans accepted by WHA. Displayed via the insurance section component.
Resources (wha_resources)
Downloadable resources, guides, and educational materials for patients.
Appointments (wha_appointments)
Appointment types and scheduling information. Has a dedicated template at appointments.php.
Articles (wha_articles)
Long-form educational articles (separate from news posts).
Did You Know (wha_did_you_know)
Quick health facts displayed in callout components throughout the site.
Data / Sync Types
Provider Ratings (wha_provider_ratings)
Patient satisfaction ratings synced from Doctor.com. The wha-doctorcom-sync plugin handles the import. Ratings display via the stars.php UI component on provider detail pages and via the provider-ratings section component.
Search Terms (wha_search_terms)
Custom search term mappings to improve internal search relevance.
Tooltips (wha_tooltips)
Medical terminology tooltips that can be referenced inline in content.
Protected Content (wha_protected_content)
Content that requires authentication or specific user roles to access.
Doctor.com Sync (wha_doctorcom_sync)
Data sync records from the Doctor.com integration. Tracks sync status and provider rating updates.
Data Relationships
Most relationships are stored as ACF relationship fields. The data handlers in functions/data/ provide helper functions for querying these relationships, and functions/queries.wha.php has WHA-specific query helpers for common lookups like "all providers at a location" or "all services for a life stage." See Developer Reference for query examples.