PHPackages                             eduardoboucas/wp-api-post-groups - 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. eduardoboucas/wp-api-post-groups

ActiveWordpress-plugin[API Development](/categories/api)

eduardoboucas/wp-api-post-groups
================================

Allows multiple groups of posts with different filters to be obtained from the WP-API in a single request

1.0.0(10y ago)15125MITPHP

Since Jun 10Pushed 10y ago2 watchersCompare

[ Source](https://github.com/eduardoboucas/wp-api-post-groups)[ Packagist](https://packagist.org/packages/eduardoboucas/wp-api-post-groups)[ RSS](/packages/eduardoboucas-wp-api-post-groups/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![No Maintenance Intended](https://camo.githubusercontent.com/d904056147052e22d8e1c7f46bb50293ed2aeb4c43ead9a2d0cf7a48b46d0562/687474703a2f2f756e6d61696e7461696e65642e746563682f62616467652e737667)](http://unmaintained.tech/)

WP-API Post Groups
==================

[](#wp-api-post-groups)

A [WP-API](http://wp-api.org/) extension that allows multiple groups of posts with different filters to be obtained in a single request.

What?
-----

[](#what)

I've been experimenting with WordPress as an API-first CMS, as explained [in this article](https://css-tricks.com/thoughts-on-an-api-first-wordpress/). With [WP-API](http://wp-api.org/) maturing into a very stable product and moving to the WordPress core in the near future, it seemed logical to use it rather than creating a custom solution.

However, an API-first approach means that every bit of information from the back-end will have to come through the API, which in some cases might mean sending multiple requests to the API to render a single page. To reduce the overhead caused by multiple HTTP requests, this plugin allows you to receive completely separate sets of data from the API in a single request.

How?
----

[](#how)

Currently, the grouping only works with [filters](http://wp-api.org/#posts_retrieve-posts_input) and it's available on two endpoints:

- **/postgroups**: Returns groups of posts
- **/pagegroups**: Returns groups of pages

Each group is defined in the URL with a label and a set of filters in this format: `label:filter[filter_type]=value`. The response is a JSON object with one node per group, named after the label.

Example
-------

[](#example)

`/postgroups?foo:filter[author]=fooguy&foo:filter[s]=foo&bar:filter[tag]=bar&bar:filter[posts_per_page]=1`

would return:

```
{
	"foo": [
		{
			// Foo post 1
		},
		{
			// Foo post 2
		},
		{
			// Foo post 3
		}
	],
	"bar": [
		{
			// Bar post 1
		}
	]
}

```

Installation
------------

[](#installation)

Download the plugin, place inside `wp-plugins/` and activate.

Contribute
----------

[](#contribute)

Feel free to share issues, feature requests or ♥.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

3996d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2db40072794551c5b7dabf9b2d46faad77ba1c31e18aef7804f9732056b57bfe?d=identicon)[eduardoboucas](/maintainers/eduardoboucas)

---

Top Contributors

[![eduardoboucas](https://avatars.githubusercontent.com/u/4162329?v=4)](https://github.com/eduardoboucas "eduardoboucas (9 commits)")

### Embed Badge

![Health badge](/badges/eduardoboucas-wp-api-post-groups/health.svg)

```
[![Health](https://phpackages.com/badges/eduardoboucas-wp-api-post-groups/health.svg)](https://phpackages.com/packages/eduardoboucas-wp-api-post-groups)
```

###  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)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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