These are chat archives for WP-API/node-wpapi

Nov 2017
Nov 23 2017 12:56

Hi, i need some help. I'm trying to use filter plugin ( but the node-api does not work. I'm using this code.

var WPAPI = require( 'wpapi' ); '' )
    .then(function( wp ) {
        // Query by the slug of a category or tag
        // 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)
            category_name: 'guide',
            tag: [ 'ecuador' ]

the filter() function appears to do nothing or maybe in a loop. If i remove the filter function, works well.

if you go to this request
you will se filter plugin it is working well.

Could you help me please.

Hello! I've the same problem, but I'm trying to use 'meta_query' (I've allowed it by using this plugin If I get filter[meta_query][0][key]=_bit_rooms&filter[meta_query][0][value]=2 it's work, but by .filter({'meta_query': [
'key': '_bit_rooms',
'value': '2',
'compare': '='
]}) it's don't want to work