How does WordPress manage to differentiate between post and page URLs without a distinct base, and how can I replicate this functionality?
I dont know how I missed out on that while looking for aproaches, but I have a working solution now based on this answer. I modified it to check for slashes in $query->request, if there is none I first look for my custom post type (get_posts() with’slug’ => $query->request). If no post is found I … Read more