I found that in version 1.5 the $query->is_main_query() condition was removed and now records are also excluded from WP API requests.
if i add to IF section – $query->is_main_query()
then everything is fine as before.
fix this please, because I need to exclude posts on the front page, but not in the REST API.
- The topic ‘Exclude post from WP API’ is closed to new replies.