ACF plugin, the api for my custom post type gives a “Critical error”

[ad_1]

As above, I created a custom post type but when I access the API at the location /wp-json/wp/v2/custom-post-type, I get a critical error. Of course flushing permalinks doesnt’ work.

By investigating, I tried to create a new post type and the API works correctly there. Then, I remember what may cause this issue. Initially I created a post type. Later I deleted this post type, after working a bit on it. And now I created the same custom post type with the same name as before. I think this may be the issue because I’m only getting the critical error by using this same name that I used before, If I edit it or if I create a totally new post type, the API works. But possibly I need to use this one. What should I do?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer