Plugin info

Total downloads: 3,440
Active installs: 10
Total reviews: 0
Average rating: 0
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 5/27/2010 (5696 days ago)
Added to WordPress: 5/27/2010 (15 years old)
Minimum WordPress version: 3
Tested up to WordPress version: 3
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 5696 days ago

20/100

Is WP Ajax Query abandoned?

Possibly abandoned (last update 5696 days ago).

Compatibility

Requires WordPress: 3
Tested up to: 3
Requires PHP: f

Languages

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Views Output Formats
Rating 0.0/5 (0 reviews)Active installs 40
Easy Query – WP Query Builder
Rating 5.0/5 (5 reviews)Active installs 400
WP Query Generator
Rating 5.0/5 (2 reviews)Active installs 10
hiWeb Soft Search
Rating 5.0/5 (1 reviews)Active installs 10
Inject Query Posts
Rating 0.0/5 (0 reviews)Active installs 10
DZS Custom WP Query Shortcode
Rating 0.0/5 (0 reviews)Active installs 10

Description

WP Ajax Query allows you to query your WordPress database using the same query paramaters you would use for WP_Query, and return a JSON respresentation of the query results. This allows developers to easily interface with WordPress without having to relearn a new API.

How It Works

The Ajax Query interface would be available at http://example.com/wp-admin/admin-ajax.php?action=query

A sample jQuery request would be like:
$.get(ajaxurl, { action: ‘query’ }, function () { }, ‘json’);

Querying for a post:
$.get(ajaxurl, { action: ‘query’, p: 1 }, function () { }, ‘json’);

JSON results:
{
“id”: 1,
“type”: ‘post’,
“title”: “Hello World”,
“permalink”: “http:\/\/example.com\/?p=1”
}

Query a category:
$.get(ajaxurl, { action: ‘query’, cat: 1 }, function () { }, ‘json’);

JSON results:
{
“id”: 1
“type”: “category”,
“permalink”: “http:\/\/example.com\/?cat=1”,
“terms”: [],
“posts”: []
}

terms and `posts` represents an array of either terms that are sub categories of the category, or posts belonging to the category.

Why I Created It

Needed a common way to query the database for posts and taxonomies across multiple plugins, and didn’t find a suitable replacement.

Installation

  1. Upload the wp-ajax-query folder into your plugin directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Frequently Asked Questions

No FAQ available

Review feed

No reviews available

Screenshots

No screenshots available

Changelog

No changelog available