DC 37 Information Architecture¶
web/app/plugins/dc37-architecture
This plugin defines the custom content architecture for the site. It registers custom post types, taxonomies, meta fields, a settings page, and SEO/breadcrumb customizations.
Custom post types¶
Registered in includes/post-types.php.
| Post Type | Description |
|---|---|
| Benefit | Details about a specific benefit section or type. |
| Local | Details about union locals |
| News Release | Used for news releases within Media Center |
Benefit¶
Used for union benefit pages (dental, health, legal etc). Hierarchical so benefit categories can be parent pages with child detail pages. The dc37/benefits-sidebar block parses the content of benefit posts to auto-generate its sidebar navigation.
| Property | Value |
|---|---|
| Post type slug | benefit |
| Archive | /benefits/ |
| Hierarchical | Yes (supports parent/child like pages) |
| Supports | title, editor, revisions, excerpt, custom-fields, page-attributes |
| REST base | benefits |
| Block template | none — free-form editor |
Local¶
Represents a union local. The post title is automatically generated on save from the local number and name meta fields (e.g. "Local 1549 - Clerical Division"). The permalink for a local is rewritten to a hash anchor on the Union Locals page (e.g. https://dc37.net/our-union/local-unions/#1549) using the post_type_link filter.
| Property | Value |
|---|---|
| Post type slug | local |
| Archive | disabled (has_archive: false) |
| Hierarchical | No |
| Supports | title, editor, custom-fields, revisions |
| REST base | local |
| Block template | dc37/union-local pattern |
News Release¶
Used for press releases and media statements. The auto-excerpt strips leading core/group and core/post-title blocks (the header metadata block in the template) before generating the excerpt, so the excerpt reflects the body copy rather than the header. An ellipsis is injected before the "Read more" link by a render_block filter.
| Property | Value |
|---|---|
| Post type slug | news-release |
| Archive | /take-action/media-center/news-release/ |
| Hierarchical | No |
| Supports | title, editor, revisions, excerpt, thumbnail |
| REST base | news-release |
| Block template | dc37/news-release pattern |
Taxonomy¶
Registered in includes/taxonomies.php.
Division¶
Organises union locals into divisions. Each division can have a phone number stored as term meta (see below). Used by the dc37/locals-accordion and dc37/locals-sidebar blocks to group and navigate locals.
| Property | Value |
|---|---|
| Taxonomy slug | division |
| Applies to | local post type |
| Hierarchical | No |
| REST base | division |
Post meta¶
Registered in includes/post-meta.php. All fields apply to the local post type, are exposed via the REST API, and use the dc37_local_meta_auth_callback auth check (requires edit_post capability on the post).
| Meta key | Type | Description |
|---|---|---|
dc37_local_number |
integer |
The local's official number (e.g. 1549). Also used as the post slug and hash anchor. |
dc37_local_name |
string |
The local's name (e.g. NYC Clerical-Administrative Employees) |
dc37_local_association |
boolean |
Whether the local is an Association rather than a Local. Affects the title prefix displayed. |
dc37_local_president |
string |
Name of the local president |
dc37_local_telephone |
string |
Local office telephone number |
dc37_local_email |
string |
Local office email address |
dc37_local_website |
string |
Local website URL |
dc37_local_we_work_as |
string |
Job title description (e.g. "Clerical workers") |
dc37_local_we_work_in |
string |
Location/agency description (e.g. "City agencies") |
Auto-title on save: When a local is saved, a save_post_local hook automatically sets the post title to {Local|Association} {number} - {name} and the post slug to the local number. The object cache is flushed on every local save to invalidate transient-cached division queries used by the Locals Accordion block.
Term meta¶
Registered in includes/term-meta.php. Applies to the division taxonomy.
| Meta key | Type | Description |
|---|---|---|
phone_number |
string |
Contact phone number for the division |
The phone number field is rendered in both the "Add Division" and "Edit Division" admin forms, with nonce verification on save. It is exposed via the REST API and displayed in the Locals Accordion block beneath the division heading.
Site options¶
Registered in includes/options.php. Available at Settings → DC37 Settings (administrators only).
| Option key | Type | Description |
|---|---|---|
dc37_union_locals_page_id |
integer |
The page that displays union locals (used to build local hash-link permalinks) |
dc37_media_center_page_id |
integer |
The Media Center landing page (used as a breadcrumb parent for posts and news releases) |
The dc37_arch_get_union_locals_page_url() helper function reads dc37_union_locals_page_id and falls back to /our-union/local-unions/ if not set. This URL is used to construct hash-anchor permalinks for all local posts.
Comments are hidden from the admin menu and admin bar for non-administrator roles.
SEO customizations¶
SEOPress Breadcrumbs¶
includes/seo-seopress.php
Hooks into the seopress_breadcrumbs_crumbs filter to override breadcrumbs for blog posts and news releases. The custom breadcrumb structure is: Home → Media Center → {section} → {date segments} → {post title}
The Media Center link is built from the dc37_media_center_page_id option. Handles all relevant archive types:
| Page type | Breadcrumb trail |
|---|---|
| Blog index | Home → Media Center → Blog |
| Blog date archive | Home → Media Center → Blog → {year} → {month} |
| Blog category archive | Home → Media Center → Blog → {category} |
| Blog post | Home → Media Center → Blog → {post title} |
| News release archive | Home → Media Center → News Releases |
| News release date archive | Home → Media Center → News Releases → {year} → {month} |
| News release singular | Home → Media Center → News Releases → {post title} |
A includes/seo-yoast.php file exists for equivalent Yoast SEO breadcrumb customizations.
Help tabs¶
includes/help.php
Adds a custom "Overview" tab to the WordPress Dashboard help panel. The tab links to the documentation site. The documentation URL is read from the DOCS_URL environment variable, falling back to https://docs.dc37.net/.