wordpress rewrite rule Стандартные правила, для пользовательского типа контента $wp_rewrite->rule
Primary tabs
Wordpress 5. Пример распечатки для типа контнте uslaga (создан с помощью CPT UI), с помощью:
print_r($wp_rewrite->rules);
получаем:
[usluga/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1] [usluga/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1 [usluga/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2] [usluga/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2] [usluga/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2] [usluga/[^/]+/attachment/([^/]+)/embed/?$] => index.php?attachment=$matches[1]&embed=true [usluga/([^/]+)/embed/?$] => index.php?post_type=usluga&name=$matches[1]&embed=true [usluga/([^/]+)/trackback/?$] => index.php?post_type=usluga&name=$matches[1]&tb=1 [usluga/([^/]+)/page/?([0-9]{1,})/?$] => index.php?post_type=usluga&name=$matches[1]&paged=$matches[2] [usluga/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?post_type=usluga&name=$matches[1]&cpage=$matches[2] [usluga/([^/]+)(?:/([0-9]+))?/?$] => index.php?post_type=usluga&name=$matches[1]&page=$matches[2] [usluga/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1] [usluga/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1 [usluga/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2] [usluga/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2] [usluga/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2] [usluga/[^/]+/([^/]+)/embed/?$] => index.php?attachment=$matches[1]&embed=true [usluga/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?uslugi=$matches[1]&feed=$matches[2] [usluga/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?uslugi=$matches[1]&feed=$matches[2] [usluga/(.+?)/embed/?$] => index.php?uslugi=$matches[1]&embed=true [usluga/(.+?)/page/?([0-9]{1,})/?$] => index.php?uslugi=$matches[1]&paged=$matches[2] [usluga/(.+?)/?$] => index.php?uslugi=$matches[1]
- Log in to post comments
- 1631 reads