Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress custom url from plugin

Tags:

wordpress

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?

like image 482
Yalamber Avatar asked Jul 31 '12 05:07

Yalamber


1 Answers

Use the Rewrite API, in your case: add_rewrite_endpoint(). See this example for detailed instructions.

like image 176
fuxia Avatar answered Nov 10 '22 00:11

fuxia