【发布时间】:2014-03-28 20:28:07
【问题描述】:
我添加了一个端点来使用add_rewrite_endpoint()创作链接
我现在可以拥有如下链接:example.com/author/username/articles
要检查当前查看的页面何时是作者页面 (example.com/author/username),我可以这样做:
if ( is_author() )
但是如何检查当前查看的页面是否是我的新端点?即:example.com/author/username/articles
参考:
https://codex.wordpress.org/Rewrite_API/add_rewrite_endpoint https://codex.wordpress.org/Function_Reference/is_author
【问题讨论】:
标签: php wordpress rewrite endpoints