The getPageData function uses this /types endpoint to compare the slug of the requests page uri then determines which post type to fetch and which template to load. This will not work in this case because ACF custom slug is not accurate in the REST API.
Not sure if this is also a problem with CPT UI or not.
Post type created with ACF with a custom url slug does not match what is returned by /wp-json/wp/v2/types
Example: Post type "solution-or-product"![image](https://github.com/CalebBarnes/nextwp/assets/24890515/8d9a87e3-2550-481e-8950-f16300ae8fca)
custom url slug "solutions-and-products"![image](https://github.com/CalebBarnes/nextwp/assets/24890515/3134c79d-c6a1-4da8-a9c8-d5784abbd3ca)
response from WP REST API /wp-json/wp/v2/types:
The
getPageData
function uses this /types endpoint to compare the slug of the requests page uri then determines which post type to fetch and which template to load. This will not work in this case because ACF custom slug is not accurate in the REST API.Not sure if this is also a problem with CPT UI or not.