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

OEmbed & sitemap

Make PFM records discoverable on the web with OEmbed embeds and XML sitemap integration.

OEmbed

Public records (entities with public in can_read_roles) are automatically discoverable as OEmbed sources. When you paste a PFM record URL into a platform that supports OEmbed (WordPress, Notion, Slack), it renders as an embedded card.

How it works

  1. PFM registers an OEmbed provider for /pfm/{entity}/{slug}/ URLs
  2. When a consumer requests the OEmbed endpoint, PFM returns a rich type response with the record card HTML
  3. The embed shows: entity icon, record label, key fields, and a link to the full record

Requirements

  • The entity must have public in its can_read_roles column
  • The record must have a pretty permalink (configured slug field)

Sitemap

PFM extends WordPress's native sitemap (wp-sitemap.xml) with a sub-sitemap for each public entity.

What gets indexed

  • One sub-sitemap per public entity (wp-sitemap-pfmrecords-1.xml)
  • Each URL uses the /pfm/{entity}/{slug}/ permalink pattern
  • Paginated at 2000 URLs per sitemap (WordPress default)

SEO considerations

  • The sitemap respects the entity's can_read_roles — private entities are never included
  • Works alongside Yoast SEO and other SEO plugins
  • Yoast compatibility: PFM disables Yoast's sitemap deduplication that would otherwise exclude PFM URLs

WP-CLI

wp pfm cache flush  # Rebuilds sitemap transients