Skip to main content
2 of 2
Made title more descriptive, fixed formatting and added a tag.
fuxia
  • 107.1k
  • 38
  • 255
  • 459

How to define a callback for an URI?

I have a function in functions.php like so:

function myplugin_mycallback($id) {
  // do something
}

I want this function called whenever a URL like myplugin/mycallback/xxx is accessed.

How/where do I define this path so it doesn't generate a 404?