Performance: Template hierarchy
MEDIUM IMPACT
This affects page load speed by determining which template files WordPress loads to render a page, impacting server processing and response time.
Creating specific templates for content types (e.g., single.php, page.php) so WordPress finds the correct template immediately.Using many unnecessary template files or fallback templates causing WordPress to check multiple files before rendering, e.g., relying on generic index.php for all pages.
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Generic index.php fallback for all pages | N/A (server-side) | N/A | N/A | [X] Bad |
| Specific templates per content type | N/A (server-side) | N/A | N/A | [OK] Good |