WordPress Expert — Easy
Key points
- `template_redirect` occurs after the query is prepared but before the template is displayed
- Useful for controlling access, redirecting users, or making template decisions
- Not meant to replace the default template with a custom file
- Does not specifically handle 404 page redirects
Ready to go further?
Related questions
