W3cubDocs

/WordPress

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_rewritestring[]
Array of root-level rewrite rules, keyed by their regex pattern.

Source

$root_rewrite = apply_filters( 'root_rewrite_rules', $root_rewrite );

Changelog

Version Description
1.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/root_rewrite_rules