Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching for posts by status draft #49

Open
paratechnical opened this issue May 29, 2018 · 0 comments
Open

Searching for posts by status draft #49

paratechnical opened this issue May 29, 2018 · 0 comments

Comments

@paratechnical
Copy link

paratechnical commented May 29, 2018

Hi,

I tried searching for posts. I need to find those having a post with a certain title with the "draft" status.

SearchRequest<Post> sr = 
            SearchRequest.Builder.aSearchRequest(Post.class)
            .withUri(Request.POSTS)
            .withFilter("title",episode.getTitle())
            .withFilter("status","draft")
            .build();
    PagedResponse<Post> postsAlreadyThere = client.search(sr);`

This returns all posts with "published" status.
I also tried with post_status and post_title for filter as well, but no change.
I tried installing a JSON filter plugin in my wordpress https://github.com/WP-API/rest-filter , but unfortunatelly nothing seems to work

Am I doing somethingwrong or is this a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant