PHPackages                             boxybird/boxybird-wp-query-endpoint - 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. boxybird/boxybird-wp-query-endpoint

ActiveLibrary[API Development](/categories/api)

boxybird/boxybird-wp-query-endpoint
===================================

Query anything you want from the WordPress database using a single REST API endpoint.

v0.1.0(5y ago)2671MITPHP

Since Nov 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/boxybird/wordpress-wp-query-rest-api)[ Packagist](https://packagist.org/packages/boxybird/boxybird-wp-query-endpoint)[ RSS](/packages/boxybird-boxybird-wp-query-endpoint/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

WP\_Query as a REST API Endpoint
================================

[](#wp_query-as-a-rest-api-endpoint)

Query anything you want from the WordPress database using a single REST API endpoint.

**Simply put, this plugin allows to pass GET params from a url into the `WP_Query` class as `$args`**

> `WP_Query` Reference: [https://developer.wordpress.org/reference/classes/wp\_query/](https://developer.wordpress.org/reference/classes/wp_query/)

[![wp_query in javascript](https://user-images.githubusercontent.com/18317878/100775094-a5e1c300-33b7-11eb-99a7-4c14c16d21e1.png)](https://user-images.githubusercontent.com/18317878/100775094-a5e1c300-33b7-11eb-99a7-4c14c16d21e1.png)

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

[](#installation)

Clone or Download plugin and run `composer install` before activating in WordPress Admin.

Usage Examples
--------------

[](#usage-examples)

### PHP

[](#php)

Normally in a WordPress theme or plugin you would create an array of $args and pass them into the `WP_Query($args)` constructor. Like this:

```
