New custom post type but why the 404?

January 3, 2017 1:43 pm Published by

When developing WordPress themes custom post types are a very useful tool. They are quick and easy to set up in your functions.php file (see this article for an example) and can make your site and it’s structure easier to manage.

However when you initially set up your post type and add new posts of that type you might notice the post permalink goes to a 404 page not found.

This is not because the code in your functions.php is incorrect, it’s because you need to save your permalink structure in settings! Once you do this your site will recognise the new post type and the permalink will now take you to the correct post.

It really is that simple – if in doubt…save the permalinks!

Categorised in:

This post was written by kristina