Use filter rest_{$this->post_type}_query to add the post meta support in WP Rest API.

Use below code snippet to add the post meta support for post type Post.


How to use?

E.g. Get posts which post meta already-visited value is true.

Code Snippet:

1 thought on “Search post by post meta with rest api.”

  1. I blog frequently and I really thank you for your information. Thiis great article has truly peajed my interest.
    I’m going tto take a note of your blog annd keep checking for
    new information about once a week. I subscribed to your RSS
    feed as well.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
%d bloggers like this: