At times, you might find some pages you’ve just created show a 404 page– a Not Found error. This is normally due to WordPress encountering conflicting permalinks, and not knowing which page to display. Fortunately, the solution is simpler than it might appear.
If you’re making use of friendly URLs (by setting up the permalink structure at Settings > Permalinks), then this error is likely caused by having different posts the same or part of the same URL. For instance, one common case might be where you have a Portfolio page and Portfolio items with the same URL:
- Normal page using a portfolio template: http://www.yoursite.com/portfolio
- Portfolio item (custom post type): http://www.yoursite.com/portfolio/item
In this case, WordPress may get confused because all portfolio items are prefixed with ‘portfolio’, while at the same time having a page with the ‘portfolio’ URL. In such a situation, the way to fix it is by editing the permalink of the page to something different, such as ‘work’ or ‘projects’.
Then, make sure you flush your permalink structure by going to Settings > Permalinks, and hitting the Save button two times in a row.