root_rewrite_rules WordPress Filter Hook
This hook is called when WordPress is rewriting the rules for the root of the site. This can be useful for creating a custom home page or customizing the way WordPress handles requests for the root of the site.
apply_filters( 'root_rewrite_rules', string[] $root_rewrite ) #
Filters rewrite rules used for root-level archives.
Description
Likely root-level archives would include pagination rules for the homepage as well as site-wide post feeds (e.g. /feed/
, and /feed/atom/
).
Parameters
- $root_rewrite
(string[])Array of root-level rewrite rules, keyed by their regex pattern.
Source
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |