HS.Hannah Stothard | Web Designer & Front End Web Developer

i love arty crafty things, making websites, interiors, travelling & growing my own veg.

recent posts

WordPress 404 on Custom Post Types

Posted in web | Tagged , , , | Leave a comment

I came across a nightmare of a problem today. Everytime I viewed my custom post types I kept getting a 404 error.  I just couldnt understand what was going on.  Thanks to this article I finally solved the problem.

When setting up custom post types and a custom permalink structure add the below code to the function used to create custom posts.

1
flush_rewrite_rules( false );

I just wanted to write a quick post to highlight the problem but an explanation of why this is needed can be found on the wordpress codex.

Related Posts:

Leave a Comment