I was wondering how to set the filter option for wp.getPosts. I want to get posts with a status of ‘trash’. is currently blank, and returns all posts other than trash.
I am using the xml-rpc wordpress api.
Here is my current code:
wpw.getPosts('<filter>', ['title','status'], function(err, data){
});
I am not sure what to put in the filter section, all the examples I could find are PHP examples and do not work in this context.
Is it even possible to get the posts with a status of ‘trash’?
It is possible to get posts filtered by status. For the filter I added:
This worked well. To get multiple status filters I just used an array: