Thank you!
sorry i should have read it myself!
another thing:
what about the feature of a conditional query on custom_fields ..
like “custom_fields.size > 10”
if there’s not this feature could you help me pointing me out where to focus for this extension ?
Thank you very much!
See http://wordpress.org/plugins/json-api/other_notes/#3.2.-Content-modifying-arguments
You’ll be looking for the last line in that section: meta_key, meta_value & meta_compare. The keys are not defined there, however, so…
JSON API uses the same parameters as WP_Query, if the JSON API docs are fuzzy or do not provide a context – the codex will help. I found the reference for your example here: http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
So, in your case, you’re going to specify meta_key = “size”, meta_value = 10, meta_compare = ‘>’
meta_compare (string) – Operator to test the ‘meta_value’. Possible values are ‘!=’, ‘>’, ‘>=’, ‘<‘, or ‘<=’. Default value is ‘=’.
I’m testing it now.
yes, i’m making it work!
but is it also possible to format the url query to handle multiple queries as specified in http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters as new WP_Query( array (.<arrays_of_queries>.)) ?
Off the top of my head – I’m going to say no – I think multiple custom field queries are beyond the scope of the plugin. I’d ask Dan to chime in here for more info – he’s the expert. If it doesn’t support it, I’d suggest extending it if you want to perform complex queries like that.