PHPackages                             shelob9/jp-tax-query - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. shelob9/jp-tax-query

ActiveLibrary[API Development](/categories/api)

shelob9/jp-tax-query
====================

Adds a tax-query endpoint to the WordPress REST API

210PHP

Since Nov 5Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Shelob9/jp-tax-query)[ Packagist](https://packagist.org/packages/shelob9/jp-tax-query)[ RSS](/packages/shelob9-jp-tax-query/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

JP Tax Query
============

[](#jp-tax-query)

Adds a tax\_query endpoint to the jp-api route or the [WordPress REST API (WP-API)](https://github.com/WP-API/WP-API). You can pass, in the body of the request a tax\_query. See [the codex](http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters) for information on how to make one of those. The request's body can have 'post\_type' and 'tax\_query' arguments only. All other arguments will be stripped out before passing to WP\_Query so don't try it.

**This endpoint does NOT require authentication. Please consider whether or not you really want the whole internet to be able to run tax queries on your site before using.**

##### TL;DR

[](#tldr)

The REST API only lets you filter by one term per taxonomy. This gives you all of the powers of tax\_queries.

### Change name of route?

[](#change-name-of-route)

`define( 'JP_API_ROUTE', 'skywalker' );`

Endpoint is now `skywalker/tax_query`

### Installation

[](#installation)

This is not a plugin.

The correct way to add it is to add `"shelob9/jp-tax-query": "dev-master"` to your site/plugin/theme's composer.json. Include composer autoloader.

Alternatively, add this repo to your site/plugin/theme using a Git Submodule or by employing the dark art of copypasta.

### Usage

[](#usage)

```
    $args = array(
    	'post_type' => 'post',
    	'tax_query' => array(
    		'relation' => 'AND',
    		array(
    			'taxonomy' => 'movie_genre',
    			'field'    => 'slug',
    			'terms'    => array( 'action', 'comedy' ),
    		),
    		array(
    			'taxonomy' => 'actor',
    			'field'    => 'id',
    			'terms'    => array( 103, 115, 206 ),
    			'operator' => 'NOT IN',
    		),
    	),
    );
    $response = wp_remote_get( json_url( 'jp-api/tax-query') , array( 'body' => json_encode( $args ) ) );
```

### License

[](#license)

Copyright 2014 Josh Pollock. Licensed under the terms of the GNU General public license version 2. Please share with your neighbor.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca938daf3f2a666cd32c7bdb6e30714da6fe0e6cd5012fe4864b18afae43fbcd?d=identicon)[Shelob9](/maintainers/Shelob9)

---

Top Contributors

[![Shelob9](https://avatars.githubusercontent.com/u/1994311?v=4)](https://github.com/Shelob9 "Shelob9 (7 commits)")

### Embed Badge

![Health badge](/badges/shelob9-jp-tax-query/health.svg)

```
[![Health](https://phpackages.com/badges/shelob9-jp-tax-query/health.svg)](https://phpackages.com/packages/shelob9-jp-tax-query)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
