DocumentationOnline documentation for Easy Query
Shortcode Parameters
Easy Query features a variety of query and styling parameters that are passed through to WordPress via shortcode.
Creating a custom Easy Query shortcode is as simple as adjusting parameters in a custom Query Builder.
All Easy Query shortcode parameters are listed below:
id | The ID of the Saved Query to be executed. Default = null |
---|---|
archive | Automatically pull content on archive pages. Supported on taxonomy, category, tag, date (year, month, day) and author archives. Default = false |
type | Select the type of container that will wrap your Easy Query templates. (<ul>, <ol>, <div>). Default = ‘<ul>’ |
classes | Target your content by adding custom classes to the container. Default = null |
paging | Enable Easy Query to page the results. Default = ’true′ |
paging_style | Choose a pagination style. Default = ’default′ |
paging_color | Choose a color for your pagination. Default = ’grey′ |
paging_arrows | Show the next and previous page arrows in the pagination. Default = ’true′ |
template | Select from a list of customizable templates. Default = 'default' |
posts_per_page | Number of posts to load with each request.Default = '5' |
post_type | Comma separated list of post types to query. Default = 'post' |
category__in | A comma separated list of categories to include by ID. Default = null |
category__not_in | A comma separated list of categories to exclude by ID. Default = null |
tag__in | A comma separated list of tags to include by ID. Default = null |
tag__not_in | A comma separated list of tags to exclude by ID. Default = null |
taxonomy | Query by custom taxonomy name. Default = null |
taxonomy_terms | Comma separated list of custom taxonomy terms(slug) to query. Default = null |
taxonomy_operator | Operator to compare Taxonomy Terms against (IN/NOT IN). Default = 'IN' |
taxonomy_relation | The logical relationship between each taxonomy when there is more than one. (AND/OR). Default = 'AND' |
day | Day of the week. Default = null |
month | Month of the year. Default = null |
year | Year of post. Default = 'IN' |
meta_key | Custom field key(name). Default = null |
meta_value | Custom field value. Default = null |
meta_compare | Operator to compare meta_key and meta_value against (IN/NOT IN/=/!=/>/>=/</<=). Default = 'IN' |
meta_type | Custom field type. Default = 'CHAR' |
meta_relation | The logical relationship between each taxonomy when there is more than one. (AND/OR). Default = 'AND' |
author | Query by author id. Default = null |
search | Query search term ('s'). Default = null |
custom_args | A semicolon separated list of value:pair arguments. e.g. post_parent:1745; event_display:upcoming. Default = null |
post__in | Comma separated list of post ID's to include in query.Default = null |
post__not_in | Comma separated list of post ID's to exclude from query.Default = null |
post_status | Select status of the post.. Default = 'publish' |
order | Order posts ASC(ascending) or DESC(descending) order. Default = 'DESC' |
orderby | Order posts by date, title, name, menu order, random, author, post ID or comment count. Default = 'date' |
offset | Offset the initial query (number).Default = '0' |
Example Shortcode
[easy_query post_type="post, portfolio, testimonials" template="default" posts_per_page="6]