WHA Docs

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.

FieldSourceNotes
Name, bio, photoPost content + ACFStandard post fields + custom fields
SpecialtiesACF relationshipLinks to wha_services
LocationsACF relationshipLinks to wha_locations
Ratingswha_provider_ratings CPTSynced from Doctor.com via wha-doctorcom-sync
NPIACF fieldNational 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:

  1. Page loads with skeleton cards (card.provider.skeleton.php)
  2. JS fetches provider data via AJAX (functions/api/providers.php)
  3. Cards populate from the card.provider.dynamic.php template

Templates: single-wha_providers.php, taxonomy-post_providers.php

Locations (wha_locations)

Physical office locations with addresses, hours, phone numbers, and interactive maps.

FieldSourceNotes
Address, phone, faxACF fieldsFormatted by format_address() and format_hours()
HoursACF repeaterDay/time pairs
Map coordinatesACF fieldsLat/lng for Mapbox markers
Associated providersACF relationshipReverse 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.

FieldSourceNotes
DescriptionPost content + ACFService detail content
Related providersACF relationshipProviders who offer this service
Life stage associationsACF relationshipWhich 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).

FieldSourceNotes
DescriptionPost content + ACFLife stage overview
Related servicesACF relationshipServices relevant to this life stage
ResourcesACF relationshipLinks 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.

On this page