This has to be pretty simple, but I'd like to parse the current URL and execute conditional code depending on whether the user is on the /sitemap/ directory.
So for example, if the site is example.com, and if the request is example.com/sitemap/.
Then I want to execute conditional code in that case. I'm using wordpress so I'm not sure if there is a built-in function that gets this...
A pure PHP solution is fine.