api request with filtering by custom field for Wordpress REST API v1 see: https://github.com/WP-API/WP-API/issues/1060
add_filter( 'json_query_vars', 'slug_allow_meta' ); | |
function slug_allow_meta( $valid_vars ) { | |
$valid_vars = array_merge( $valid_vars, array( 'meta_key', 'meta_value' ) ); | |
return $valid_vars; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment