Skip to content
daggerhart edited this page Mar 16, 2012 · 5 revisions

###Fields

Fields are a means of outputting specific data for a post. All field callbacks are executed within a WP loop, so common WP functions like get_the_title() will work.

Example Field

###Sort Options

Sort Options alter the order of posts returned by a query. They are generally very simple key/value pairs. The default sort options provided by Query Wrangler are based on the default available WP_Query parameters.

WP_Query Order Reference

Example Sort Option

###Filters

Filters account for all other WP_Query parameters that aren't related to Order. Some WP_Query parameters are simple key/value pairs, such as post_parent, while others are much more complex, such as Taxonomy.

Simple Filters with key -> value relationship. WP_Query Post Refernce

Complex Filters with key -> array relationship. WP_Query Taxonomy Reference

Example Filter

###Contextual Filters

Contextual Filters are very similar to Filters in the sense that their purpose is to handle both simple and complex WP_Query parameters that are not related to Order.

Contextual Filters differ from Filters in that an admin does not provide a value for the filter in the admin interface, but rather the Contextual Filter determines the value of the filter based on the global $wp_query object.

Example Contextual Filter

Clone this wiki locally