PHPackages                             mehedimi/wp-query-builder-ext - 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. mehedimi/wp-query-builder-ext

ActiveLibrary

mehedimi/wp-query-builder-ext
=============================

An Extension of WP Query Builder

0.3(2y ago)043MITPHP

Since Jul 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mehedimi/wp-query-builder-ext)[ Packagist](https://packagist.org/packages/mehedimi/wp-query-builder-ext)[ RSS](/packages/mehedimi-wp-query-builder-ext/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

[![WP Query Builder Extension Banner](https://camo.githubusercontent.com/b2da3abe0b62a3e0925f831f26a23fb7921388b1bf35e984e11b3eb2e86fb31e/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f575025323051756572792532304275696c646572253230457874656e73696f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6d65686564696d6925324677702d71756572792d6275696c6465722d657874267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d416e2b457874656e73696f6e2b6f662b57502b51756572792b4275696c646572266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d646f63756d656e742d6475706c6963617465)](https://camo.githubusercontent.com/b2da3abe0b62a3e0925f831f26a23fb7921388b1bf35e984e11b3eb2e86fb31e/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f575025323051756572792532304275696c646572253230457874656e73696f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6d65686564696d6925324677702d71756572792d6275696c6465722d657874267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d416e2b457874656e73696f6e2b6f662b57502b51756572792b4275696c646572266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d646f63756d656e742d6475706c6963617465)

WP Query Builder Extension
--------------------------

[](#wp-query-builder-extension)

This is an extension of [WP Query Builder](https://github.com/mehedimi/wp-query-builder).

### Installation

[](#installation)

It is a composer package. You can install it using composer by executing following composer command.

```
composer require mehedimi/wp-query-builder-ext
```

It has some relations and plugins of [WP Query Builder](https://github.com/mehedimi/wp-query-builder).

### Relations

[](#relations)

#### WithTaxonomy

[](#withtaxonomy)

With this relation you will be able to load associative taxonomies of specific posts.

```
// Retrieve all posts with associative taxonomies.
DB::table('posts')
->withRelation(new WithTaxonomy('taxonomies'))
->get()
```

If you need group by taxonomy type then just call `groupByTaxonomy` method on `WithTaxonomy` relation.

```
// Retrieve all posts with associative taxonomies group by with its type.
DB::table('posts')
->withRelation(new WithTaxonomy('taxonomies'), function(WithTaxonomy $taxonomy){
    $taxonomy->groupByTaxonomy()
})
->get();
```

Optionally you add constrain of taxonomy type by calling `taxonomy` method of `WithTaxonomy` relation.

```
// This will fetch only category type of taxonomy.
DB::table('posts')
    ->withRelation(new WithTaxonomy('categories'), function(WithTaxonomy $taxonomy){
        $taxonomy->taxonomy('category');
    })->get();
```

### Plugins

[](#plugins)

#### JoinPostWithMeta

[](#joinpostwithmeta)

With this plugin, you will be able to join `postmeta` table with `posts` very easily. You need to just apply that plugin and that's it. Some examples are given below:

```
DB::plugin(new JoinPostWithMeta())->select('posts.*')->where('meta_key', 'some meta key name')->get()
```

You could supply the join type on `JoinPostWithMeta` class constructor as well.

```
// For joining right join `postmeta` with `posts` table
DB::plugin(new JoinPostWithMeta('right'))->select('posts.*')->where('meta_key', 'some meta key name')->get()
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

###  Release Activity

Cadence

Every ~279 days

Total

3

Last Release

827d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61ac017ba729c7fd9bfb6c069dba5298ef632692640bcd6bfe4f0ea72e1eb2e1?d=identicon)[mehedimi](/maintainers/mehedimi)

---

Top Contributors

[![mehedimi](https://avatars.githubusercontent.com/u/10108409?v=4)](https://github.com/mehedimi "mehedimi (8 commits)")

---

Tags

phpwpwp-query-builder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mehedimi-wp-query-builder-ext/health.svg)

```
[![Health](https://phpackages.com/badges/mehedimi-wp-query-builder-ext/health.svg)](https://phpackages.com/packages/mehedimi-wp-query-builder-ext)
```

PHPackages © 2026

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