Shaun's WP Query Shortcode

This extensible plugin allows you to run a custom WP_Query using a simple shortcode, then display the results using compatible nested shortcodes.

Author:Shaun Scovil (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:3.4.2
Plugin version:1.2
Added to WordPress repository:24-06-2012
Last updated:20-10-2012
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:1
Plugin URI:http://mynewsitepreview.com/shauns-wp-query-s...
Total downloads:2 025
Active installs:10+
plugin download
Click to start download

Written as a platform for plugin developers, this simple-yet-powerful plugin allows you to run a custom WP_Query using shortcode, then display the results any way imaginable using compatible nested shortcodes.

How It Works

Add the following shortcode to any WordPress post or page:

[wpquery orderby="rand"] [wpq_index] [/wpquery]

In the example above, the [wpquery] shortcode performs a WP_Query using orderby=”rand” to display the results in random order. A full list of query parameters can be found here: WP_Query.

Next, the nested [wpq_index] shortcode displays the results of the custom WP_Query as an unordered list of post title links.

Why It Rocks

Written as a platform for plugin developers, this simple-yet-powerful plugin allows developers to write compatible plugins that manipulate the way post data is displayed – without needing to write functions and shortcode parameters to first retrieve the post data.

The [wpq_index] shortcode function included in this plugin is just a simple example of what it can do. Any plugin that performs a WP_Query could be rewrtitten and optimized to work with this plugin, eliminating a lot of unnecessary code.

Best of all, this plugin gives users total control over the WP_Query being performed!


Screenshots
FAQ
ChangeLog