Created
September 30, 2015 20:49
-
-
Save anonymous/d8b15be6105a9aa7ff78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // All posts belonging to author with nicename "jadenbeirne" | |
| wp.posts().filter( 'author_name', 'jadenbeirne' ).get(); | |
| // All posts in category "islands" and tags "clouds" & "sunset" | |
| // (filter can either accept two parameters, as above where it's called with | |
| // a key and a value, or an object of parameter keys and values, as below) | |
| wp.posts().filter({ | |
| category_name: 'islands', | |
| tag: [ 'clouds', 'sunset' ] | |
| }).get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment