Permalinks & SEO
Each public entity gets pretty permalinks on the front-end. Records become web pages with their own URLs.
URL pattern
- Archive:
/pfm/{entity_slug}/— lists all records - Single record:
/pfm/{entity_slug}/{record_slug}/— shows one record
Record slug resolution
PFM determines the record slug in this order:
- Configured slug field — set via
pfm_slug_field_{entity}option pointing to a TEXT field. The field value is sanitised (lowercase, hyphens) and matched with increasingly permissive lookups. - Hex fallback — if no slug field is configured, uses the 32-character hex
sys_iddirectly.
Theme overrides
Your WordPress theme can override PFM templates by adding these files:
pfm/single-{entity}.php— single record template for a specific entitypfm/single.php— fallback single record templatepfm/archive-{entity}.php— archive template for a specific entitypfm/archive.php— fallback archive template
Rewrite rules
PFM registers its rewrite rules on activation and flushes them when entities are added or removed. The flush is smart — it only triggers if the rewrite rules actually changed (tracked via pfm_rewrite_rules_hash).
Yoast SEO compatibility
PFM integrates with Yoast SEO:
- PFM records appear in XML sitemaps
- Yoast's sitemap deduplication is disabled for PFM URLs (Yoast would otherwise exclude them as "unknown post types")
- Yoast SEO meta fields work on PFM record pages