plugins – Filter custom post type returned from REST api

Question

I’m creating a plugin and I have registered some custom post types. I’m getting them on a vue app using the rest api, I’ve also added some custom fields that are returned when the post types are loaded. I have a param that I need to check when the cps are loaded, is there any way to filter the returned results from the rest api if the value of a custom field is different than the expected?

In particular I’ve added a start_date and end_date field and I need to return only the cpt when the start date param is matching the current day.

0
devdev 1 month 2022-10-29T07:24:12-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse