• Hi everyone,

    I’m developing a custom post type in WordPress, but I’m running into an issue where it’s not showing up in the REST API. I have ‘show_in_rest’ => true in my custom post type registration code, but it’s still not appearing. Has anyone faced this before, or does anyone have a solution? Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    How are you authenticating API requests? Maybe the user role associated with the authentication is incompatible with the post type’s various capability args? The post type’s public and publicly_queryable args might also affect access through the API.

    If you’ve tried to implement custom post type capabilities, this is most likely where the issue lies. Coordinating post type capabilities with user capabilities is not a straight forward task. I ended up using 'capability_type' => 'post', out of frustration.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.