"Preview" function won't work on custom post types!

Posted in: Newspaper
Post count: 49

Hello, I have a custom post type called “destinations” and the preview function as I edit doesn’t work properly. For some of these destination pages, it returns the 404 pages as a preview, and for others, it previews existing posts that start with the same name. For example, I was editing “Asia” destination, and when previewing my edits, it previewed a blog post called “Asia’s 5 Best Cities for Street Food.”

Any idea what’s causing this? Thanks in advance!

Post count: 388

Has something to do with permalinks. The preview is trying to load it by ID, maybe, but the link is the slug, so it doesn’t find it. Or vice versa. I haven’t worked with custom post types, so unfortunately I can’t outline the steps to fix.

On a side note, the similar name preview is actually the same as 404. If you put in a slug that doesn’t exist, WP suggests the end of the slug. If it can’t find any matches, you get 404. You learn something every day 😀

Post count: 49

Ah, that makes sense. It only has been doing it on a few, so I’ll just drop the issue unless it starts doing it for new posts/pages. Thanks for your help!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.