1
對於一個插件我需要一個subpage
定期的WordPress page
。正常page
位於add_rewrite_rule自定義子頁面
http://example.com/page
爲了得到一個subpage
http://example.com/page/subpage
我使用的rewrite_rule:
add_rewrite_rule('([^/]+)/(subpage|subpage2|subpage3|subpage4)', 'index.php?pagename=$matches[1]&_mysubpage=$matches[2]', 'top');
這工作罰款,直到我移動到page
a parent
頁數:
http://example.com/parentpage/page/subpage
,或者如果我設置page
爲主頁
http://example.com/subpage
額外add_rewrite_rule
我需要哪個?