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
- PFM registers an OEmbed provider for
/pfm/{entity}/{slug}/URLs - When a consumer requests the OEmbed endpoint, PFM returns a
richtype response with the record card HTML - The embed shows: entity icon, record label, key fields, and a link to the full record
Requirements
- The entity must have
publicin itscan_read_rolescolumn - 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