This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Ajax Query


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

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:\/\/\/?p=1”

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

JSON results:
“id”: 1
“type”: “category”,
“permalink”: “http:\/\/\/?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.<h3>Why I Created It</h3>

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


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


ह्या प्लगइनसाठी कोणतेही समीक्षण नाही.

योगदानकर्ते आणि विकसक

“WP Ajax Query” हे मुक्त स्रोत सॉफ्टवेअर आहे. पुढील लोक या प्लगइनच्या निर्मितीत योगदान केले आहे.


भाषांतर करा “WP Ajax Query” तुमच्या भाषेत.

विकासातील आग्रह?

कोड ब्राउझ करा, SVN संग्रहालय तपासा, किंवा विकास लॉग च्या RSS द्वारे सदस्यता घ्या.