I’m trying to write a WordPress Plug-in but can’t seem to figure out how you would modify how a URL gets handled, so for example: any requests made for:
<url>/?myplugin=<pageID>
will get handled by a function in my plug-in. I’m sure this is a very simple to do, but I’m pretty new to working with WordPress and couldn’t find it in the documentation.
In order to handle just a specific URL use the code below:
That should set you on the right direction. parse_request happens before WordPress runs any of the complicated WordPress queries used to get the posts for the current URL.