I created a new custom post type called event
, which works fine.
I also created a custom 404
page template, which is shown if a event/page/post is not found.
But now the hard part, i want to create a custom 404 page for event post type. So this 404 page is only shown if a event is not found. But the default 404 page should still work with posts or pages.
Thanks
Two options:
404.php
, to output different content/markup for the post-typetemplate_redirect
, and include a separate template file for a 404 for the post-type.Personally, I’d go with option 1, as it is easier and more intuitive.