I want to be able to create url from plugin. for example. A new url would be http://example.com/slug-set-from-plugin which will output contents from plugin methods. Is it doable?
Use the Rewrite API, in your case: add_rewrite_endpoint()
. See this example for detailed instructions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With