rankmath-plugin-compatibility
Installation
SKILL.md
Rank Math plugin compatibility
Implement a soft, hook-based compatibility layer that keeps working when Rank Math is absent or a module is disabled. Prefer WordPress and documented Rank Math hooks over internal containers, direct output, or copied plugin logic.
Workflow
- Identify the content surface: singular CPT, taxonomy archive, virtual route, editor-only field, headless URL, or imported SEO metadata.
- Confirm whether Rank Math is optional or a declared dependency. Keep it optional unless the product explicitly cannot function without it.
- Register integration hooks early and idempotently.
- Make frontend output and editor analysis agree, but do not confuse them: frontend PHP filters do not update the editor score, and editor JavaScript filters do not alter frontend tags.
- Verify rendered HTML, not only stored meta or callback execution.
- Test once with Rank Math active and once inactive.
Bootstrap safely
rank_math/loaded fires while the Rank Math plugin file is loading, before its plugins_loaded:14 initialization and before modules load on after_setup_theme:2. Handle both plugin load orders: