Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

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:

  1. 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.
  2. Hex fallback — if no slug field is configured, uses the 32-character hex sys_id directly.

Theme overrides

Your WordPress theme can override PFM templates by adding these files:

  • pfm/single-{entity}.php — single record template for a specific entity
  • pfm/single.php — fallback single record template
  • pfm/archive-{entity}.php — archive template for a specific entity
  • pfm/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