I am trying to:GET a custom post type
Link to a page where the issue can be seen:curl -X OPTIONS -i hidden link
I expected to see:an array of posts
Instead, I got:http 200 but no posts
Hello,
I assume we are talking about a custom post type "Course" created with Toolset Types plugin.
I have tried it in a fresh WP installation + the latest version of Toolset plugins, it works fine, you can see it in below test site.
Login URL:
hidden link
Custom post type "Course":
hidden link
REST API result:
hidden link
Is there any missing steps? can you reproduce the same problem in above test site? thanks
That does nothing for me.
I have a site made with Toolset Types 2 many years ago. I upgraded to 3, checked "show_in_rest", and added add_filter( 'toolset_rest_run_exposure_filters', '__return_true' ); to my functions.php.
It returns nothing for every type. I also disabled all other plugins to test it.
What else do I need to do?
I assume you can not reproduce the same problem in above test site too.
It might be a compatibility issue, some other plugins/theme prevent the REST API works in your website.
Please check these:
1) deactivate all other plugins, and switch to WordPress default theme 2022, and test again
2) Also check if there is any PHP error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging
3) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
I am downloading the files, will update here if find anything
Please try this in your website:
hidden link
Edit the custom post type "Course", in section "Options", enable setting "show_in_rest", save and test again
It works fine with your duplicator package in my localhost.
My issue is resolved now. Thank you!