Custom post type by ID in root folder

Try creating a custom rewrite rule and a custom rewrite tag. This should allow you to set up a regular expression to capture the ID and manipulate the query.

Rewrite API/add rewrite rule « WordPress Codex
https://goo.gl/kdEJd8
Rewrite API/add rewrite tag « WordPress Codex
https://goo.gl/PVLzLh

Leave a Comment