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 entries that have either L1 OR L2 OR L3 ; use comma (,)

https://example.com/cms/wp-json/pages?filter[tag]=L1,L2,L3

I have only used this with posts but it should work for pages too.

Leave a Comment