Audit feed-template usage
This WP-CLI guide is for administrators and developers preparing a site to use custom HTML feed templates consistently.
The read-only command reports archive, listing, related-content, WooCommerce, builder, widget, and template locations that do not resolve to a usable custom feed template.
Before you begin
- Run the command for one explicit WordPress site.
- Confirm that POM Theme is active for that site.
- Know which custom feed templates are expected.
- Use a staging or maintenance workflow before correcting many findings.
Run the audit
wp pom audit-feed-template-usage --url=https://example.com
Include currently inactive locations:
wp pom audit-feed-template-usage --include-inactive --url=https://example.com
Create a CSV report:
wp pom audit-feed-template-usage --format=csv --url=https://example.com
Run the command separately for each site in a multisite network.
Understand findings
A finding means the effective template selector:
- is empty;
- still uses a default value; or
- points to a custom feed template that cannot be rendered.
The public fallback can preserve a basic result structure, but it does not make the configuration complete. Assign a deliberate, valid feed template and verify the affected page.
Use --include-inactive when planning a comprehensive cleanup. Otherwise, inactive related-content areas or disabled modules do not need to block the current launch.
Correct the site
For each active finding:
- identify the public page or feature;
- choose an appropriate custom feed template;
- assign it in Theme Options, the builder element, or the relevant content setting;
- clear the affected cache;
- verify image, title, metadata, excerpt, actions, and empty state;
- rerun the audit.
Do not assign one generic template everywhere merely to produce an empty report. The template must match the content and visitor task.
Use as a readiness check
The optional --fail-on-findings flag returns a failing command status when findings remain. Use it in a reviewed site-launch or maintenance checklist when unresolved active locations should stop the process.