Core Function
View Source on Trac ↗ add_rewrite_rule()
add_rewrite_rule( mixed $regex, mixed $query, mixed $after = 'bottom' ) Adds a rewrite rule that transforms a URL structure to a set of query vars.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $regex string | Regular expression to match request against. Required |
| (string | | array) $query The corresponding query vars for this rewrite rule. Required |
| string | $after Optional. Priority of the new rule. Accepts 'top' or 'bottom'. Default 'bottom'. Required |
Return Value
(void)
No return value description available.
Function Information
Since Version
2.1.0
Source File
wp-includes/rewrite.php
Advertisement