• Resolved matinhas

    (@matinhas)


    I’m trying to get list with a type of posts from a plugin (bookings), but after enabling the post type and fields on WP REST API Controler, the URL (example.com/wp-json/wp/v2/booking) return an empty array “[]”.
    However, if I get only one post (example.com/wp-json/wp/v2/booking/13584) it will return the fields of this post as desired.
    Is there some setting about the post type that I need to change? I’ve tried with other post types from the same plugin (services) and that got the list published.

Viewing 1 replies (of 1 total)
  • @matinhas,

    I would check with the plugin develop to make sure they’re no doing something to force 0 results to return from the query. You might be able to change their functionality by filtering it in your child theme or a custom plugin.

    I don’t know what plugin you’re using but since you said the other post types were working it seems like its something they would need to fix for you so I’m going to close this ticket. Feel free to comment if you have any more questions!

    Cheers,
    Freddie

Viewing 1 replies (of 1 total)
  • The topic ‘Cannot get a list of posts, just one by one’ is closed to new replies.