“Virtual” Custom Post Type
-
Hi, I’m looking for the best way to integrate some external data into WordPress without it having a representation or any data stored in the WordPress database. I have currently tried to add custom post type that is hidden from the menu where I load the list of external content, the “custom posts” on the “Archive” template. What I’m having problems with is creating the “single” view for these virtual custom posts as of course WordPress doesn’t find anything in its database for an URL like https://example.com/virtual_post_type/external_id and just displays 404. Does anyone know of other ways to achieve this or how to tell WordPress to just display the single post template for this and let me handle the rest? I could of course also just use a custom page template for this data and add the individual “posts” as query parameter like https://example.com/virtual_post_type?id=external_id. Any input is welcome! Thanks
- The topic ‘“Virtual” Custom Post Type’ is closed to new replies.