I was wondering where a URL like this:
Is converted into this:
Specifically, I'm looking for which part of the code takes a post ID and finds the page it's supposed to be on.
The reason why is a little tricky, but I'm essentially creating a system where each page in a thread can have a variable amount of actual posts. I can paginate this correctly, but I need to put a little extra logic in the part where those links are converted so links with just a post ID will go to the right page.
Thank you very much for any help!