Sometimes when working with WordPress, it is necessary to create Custom Post Types that have certain fields or features different from those offered by conventional WordPress publications such as pages or blog posts.
For this reason, from version 3.0 of WordPress it is allowed to create this type of posts, becoming instantly popular, given the multiple possibilities they offer. In addition, many plugins have been created to facilitate this task to developers, among the most used are: Advanced Custom Fields (ACF), Custom Post Types UI and Toolset.
However, when adding these types of custom posts it is common to encounter the error 404 (page not found) when trying to access the URL of these. That is why, here we will tell you the most common way to solve this problem:
Check your permalinks settings when using Custom Post Types
Permalinks are as the name suggests; unique URL links to posts, and archive pages such as categories, tags, search pages and so on. When you access one of these URLs, it will take you directly to that specific page or archive within the website.
WordPress allows you to access the configuration of permalinks through its administration panel. To do this, simply go to Settings -> Permalinks.
Once there, set the custom structure to %postname%, then click Save.
Afterwards, check if the solution worked. To do this, try accessing the custom post again and check that it does not show the 404 error.
If it still does, go back to the configuration, change the permalinks back to default and click Save. Then, try setting the custom permalinks, and again click Save.
This should fix the problem, the times we’ve had this issue; this has been the easiest and quickest way to fix it.
We hope this Tip will be helpful.
Thank you for reading, until next time.