Filter posts by multiple custom taxonomy terms using AND operator in REST API v2 (WordPress)

I think I know the fix. I noticed that the plus sign (+) in the url arguments was automatically being stripped and converted into a space. My arg values ‘august+september’ were becoming ‘august september’ after decoding. I found out that ‘%2B’ is the code equivalent of the + symbol. So, instead of using: /wp-json/wp/v2/events?filter[event_categories]=august+september Use: … Read more

How to define a query parameter with REST API?

Yes, from the link you posted there are examples for both sanitising and validating the parameters. Validating does a check which can fail and block the API call from running; sanitising just does some operations to clean or interpret the parameter and does not stop the API call from running. An example of validation, taken … Read more

Including WordPress in RESTful API

The credit for this answer really goes to @Wyck who correctly identified the source of the problem. Thank you very much. The reason for the problem is: There is a variance between an import statement in the mainline code versus within a function. In WP or in in any of the plugins if variables aren’t … Read more

Retrieving pages with multiple tags using REST API

I ran into the same problem but for posts. I found how to OR or AND tags together here: https://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters To get entries that have both L1 AND L2 AND L3 ; use plus (+) https://example.com/cms/wp-json/pages?filter[tag]=L1+L2+L3 In case somebody else comes along and wants to OR terms together I’ll save you the trouble: To get … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)