WordPress completely remove custom post type

I created a custom post type called ‘events’ a while back. This is no longer required so I have deleted all posts with this post type from the database and from the functions.php file.

I now want to create a page called /events but this still takes me to an archive page which is looking for the posts with the post type ‘events’, but obviously nothing is found.

Read More

Is there a way to completely remove any traces of there ever being a custom post type called ‘events’ registered? I have even cleared auto-saves too..

Thanks

Related posts

Leave a Reply

3 comments

  1. This is the problem of permalinks. The new page you have created is still getting the permalink of last event post-type. Just edit the event page you have created and below title of page, edit the permalink of event to event1 or anythingelse. Hope this would work for you.