I'd like to pass all requests for a given directory using a plugin or template file.

For instance, all of the following requests would be sent to the plugin:


I would then like to do some custom processing on the "blah", "foo bar", and "another one here" data, outputting resulting content.

I've looked into rewrite rules, but I can't figure out if this is just used for "prettifying" URLs or if it can be used for more complex processing.

Edit: I do not believe I need an endpoint. I don't want to add an action to some other post types. For instance, let's say /directory/ is retrieving content from another server.

  • Why do you not want to use an endpoint? They are made exactly for this situation. Please add an explanation to your question. – fuxia Oct 1 '13 at 16:46
  • The example that is given for endpoints are things like tracebacks. As I understand it, that might mean I would want something like /post/01/12/2004/traceback/ to give a traceback for that particular post. On the contrary, the plugin will have nothing to do with particular bits of content in Wordpress. – Dan Oct 1 '13 at 17:57
  • Nope, you can register endpoints for almost any URL, including the root URL. See this example. – fuxia Oct 1 '13 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.