Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望能够从插件创建 url。例如。一个新的 url 将是http://example.com/slug-set-from-plugin,它将输出插件方法的内容。可行吗?
使用Rewrite API,在您的情况下:add_rewrite_endpoint(). 有关详细说明,请参阅此示例。
add_rewrite_endpoint()