# Welcome

{% content-ref url="/pages/-LUHHhvESEQMEbZbuCPp" %}
[WP Query Engine](/plugins/wp-query-engine)
{% endcontent-ref %}

{% content-ref url="/pages/-LUICxPGAl4STXLx88Hl" %}
[WPCL Beaver Extender](/plugins/wpcl-beaver-extender)
{% endcontent-ref %}


# WP Query Engine

![](https://ps.w.org/wp-query-engine/assets/banner-1544x500.png)

WP Query Engine allows you to perform custom queries using the WP\_Query class, using a simple shortcode or the built in Beaver Builder module.

* Any post parameters
* Any meta data
* Any taxonomy data, such as category or tag

In addition, the plugin offers several exposed filter and action hooks for theme developers to alter the default functionality, including adding additional parameters not specified in the shortcode.

{% content-ref url="/pages/-LUHMQPEDLjMHtyZwM9n" %}
[Getting Started](/plugins/wp-query-engine/getting-started)
{% endcontent-ref %}

{% content-ref url="/pages/-LUHMURAaI8vXPlKC4sl" %}
[Changelog](/plugins/wp-query-engine/changelog)
{% endcontent-ref %}

{% content-ref url="/pages/-LUGdfNNfLYk8sBV6pQc" %}
[Shortcode](/plugins/wp-query-engine/shortcode)
{% endcontent-ref %}

{% content-ref url="/pages/-LUGibuGvL1jmvuwoDfb" %}
[Filters](/plugins/wp-query-engine/untitled)
{% endcontent-ref %}

{% content-ref url="/pages/-LUGvdT23U7psNL0whrt" %}
[Templating](/plugins/wp-query-engine/templating)
{% endcontent-ref %}


# Getting Started

Quick start plugin guide

## Installing the plugin

### **Using the WordPress Search**

1. Navigate to the **Add New** in the plugins dashboard
2. Search for **WP Query Engine**
3. Click **Install Now**
4. Activate the plugin on the plugin dashboard

### **Uploading Using WordPress**

1. Navigate to the **Add New** in the plugins dashboard
2. Navigate to the **Upload** area
3. Select `wp-query-engine.zip` from your computer
4. Click **Install Now**
5. Activate the plugin in the plugin dashboard

### **Using FTP**

1. [Download](https://wordpress.org/plugins/wp-query-engine/) `wp-query-engine.zip`
2. Extract the `wp-query-engine` directory to your computer
3. Upload the `wp-query-engine` directory to the `/wp-content/plugins/` directory
4. Activate the plugin in the plugin dashboard

## Using the plugin

### Shortcode

Simple place the shortcode **\[wp\_query]** anywhere in your content. The [shortcode takes several optional arguments](https://docs.wpcodelabs.com/plugins/wp-query-engine/shortcode) to customize the query, and the output.


# Changelog


# Shortcode

The The shortcode \[wp\_query] is the easiest way to display a custom loop anywhere in your content.

## Standard Parameters

The shortcode accepts several parameters:

* **post\_type** : Comma separated list of post types to query
* **posts\_per\_page** : Integer value of the posts to query
* **category\_\_in** : Comma separated list of categories to include
* **category\_not\_in** : Comma separated list of categories to exclude
* **tag\_\_in** : Comma separated list of tags to include
* **tag\_\_not\_in** : Comma separated list of tags to exclude
* **author\_\_in** : Comma separated list of authors to include
* **author\_\_not\_in**: Comma separated list of authors to exclude
* **template** : String template name or path to template relative to the theme directory (optional)
* **pagination** : True/false whether to use pagination (default: false)
* **ignore\_sticky\_posts** : Whether to ignore sticky posts (default: false)
* **orderby** : What to order the posts by
* **order** : ASC or DESC sort order
* **context** : String context used to filter the query during execution, optional

### post\_type

A comma separated list of post types to query.

* Default: post
* Required: false
* Type: comma separated list

```php
[wp_query post_type="post, page, event"]
```

### posts\_per\_page

Number of post to show per page. Use **-1** to show all posts. If combined with the pagination parameter, it will limit the posts per page. If pagination is false, it will limit the total number of posts displayed.

* Default: wordpress default
* Required: false
* Type: integer

### category\_\_in

Display posts that have these categories.

* Default: null
* Required: false
* Type: comma seperated list of category names, slugs, or id's

### category\_not\_in

Exclude posts that have these categories.

* Default: null
* Required: false
* Type: comma seperated list of category names, slugs, or id's

### tag\_\_in

Display posts that have these tags.

* Default: null
* Required: false
* Type: comma seperated list of tag names, slugs, or id's

### tag\_\_not\_in

Exclude posts that have these tags.

* Default: null
* Required: false
* Type: comma seperated list of tag names, slugs, or id's

### author\_\_in

Display posts by these authors.

* Default: null
* Required: false
* Type: comma seperated list of author names, or id's

### author\_\_not\_in

Exclude posts by these authors. Accepts name, or id's. Passed as a comma seperated list.

* Default: null
* Required: false
* Type: comma seperated list of author names, or id's

### template

Specify the output template. This can be done in one of several ways:

1. **By Name:** If you've registered your template with the plugin, you can specify the template by name
2. **By path:** If you have not registered your template, you can specify the path relative to your themes root directory. If a path is specified, the plugin will attempt to load the template if possible.

* **Default:** Plugin Default
* **Required:** false
* **Type:** string

**Note:** The plugin contains a default template that will be used if no template is specified.

```php
[wp_query template="my_custom_template"]

[wp_query template="my_custom_template.php"]

[wp_query template="my_template_path/my_custom_template.php"]

[wp_query template="my_template_path/my_custom_template"]
```

### pagination

Whether or not to paginate the posts displayed

* Default: false
* Required: false
* Type: boolean ( true / false )

### ignore\_sticky\_posts

Ignore default sticky post functionality. If set to true, sticky posts will appear in the normal post order. If false, sticky posts will appear first.

* Default: true
* Required: no
* Type: boolean ( true / false )

### orderby

What data to order the posts by

* Default: date
* Required: no
* Type: String, see the [codex](https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters) for all options

### order

How to order posts

* Default: DESC
* Required: no
* Type: ASC / DESC

### context

Optional string used to identify a specific instance, for additional actions and filters.

* **Default**: null
* **Required**: false
* **Type**: string

## Dynamic Parameters

The shortcode can also perform custom taxonomy queries using any taxonomy name, in the format:

### {tax\_name}\_\_in

Display posts that contain this taxonomy terms.

* Default: null
* Required: false
* Type: comma seperated list of term names, slugs, or id's

### {tax\_name}\_\_not\_in

Exclude posts that contain this taxonomy terms.

* Default: null
* Required: false
* Type: comma seperated list of term names, slugs, or id's

**Examples**

To query all posts of post type "recipe" with the taxonomy of "recipe\_type" with the terms "breakfast" or "brunch", and using the "List" template:

```php
[wp_query post_type="recipe" recipe_type__in="breakfast, brunch" template="List"]
```


# Filters

WP Query Engine provides several filters that allow you to customize many aspects of operation.

### wp\_query\_engine\_templates

Output templates can be added, removed, or modified using the `wp_query_engine_templates` filter.

Template registration is not required for use in a shortcode, but *is* required to add custom templates to select lists, such as in the Beaver Builder module or sidebar widget.

```php
function register_templates( $templates ) {
    $templates['My Custom Template'] = get_stylesheet_directory() . '/templates/my_custom_template.php';
    return $templates;
}
add_filter( 'wp_query_engine_templates', 'register_templates' );
```

### wp\_query\_engine\_template

Force the use of a specific template, regardless of which template is selected. The `wp_query_engine_template` filter allows developers to select a template programmatically at the time of output, instead of specifying beforehand.

```php
function force_template( $template_name, $atts, $query ) {
	if( $atts['context'] === 'my_custom_context' ) {
		$template_name = 'templates/my_custom_template.php';
	}
    return $template_name;
}
add_filter( 'wp_query_engine_template', 'force_template', 10, 3 );
```

### wp\_query\_engine\_args\_raw

Filter the query arguments before they are processed. This allows you to add additional arguments, or control the arguments  within your code, instead of the shortcode or other means.

```php
function force_query_args( $args ) {
    if( isset( $args['post_type'] ) && $args['post_type'] === 'recipe' ) {
        $args['tag__in'] = array( 'featured' );
    }
    return $args;
}
add_filter( 'wp_query_engine_args_raw', 'force_query_args' );
```

### wp\_query\_engine\_args

Filter the query arguments after processing. This allows developers to apply some specific formatting to the arguments after they've been normalized, but before being passed to WP\_QUERY. At this point, the post id's that will be queried is already set, so fewer arguments can be applied.

```php
function force_query_args( $args ) {
    if( isset( $args['post_type'] ) && $args['post_type'] === 'recipe' ) {
        $args['post_per_page'] = -1;
    }
    return $args;
}
add_filter( 'wp_query_engine_args', 'force_query_args' );
```

### wp\_query\_include\_loop

By default, the template includes a loop with specific template actions already defined. The loop uses the template name to define custom actions.

The template name is normalized by removing spaces, dashes, and .php. If a template is defined by name, such as *My Custom Template*, it will be normalized to *my\_custom\_template*. A name specified by path, such as *templates/homepage\_loop.php*, it will be normalized to *templates\_homepage\_loop*.

If you do not wish to include the default loop, and instead want to define your own loop in your custom template files, you can using the `wp_query_include_loop` filter.

```php
function dont_include_wp_query_loop( $include, $atts ) {
	if( $atts['template'] === 'My Custom Template' ) {
		return false;
	}
	return true;
}
add_action( 'wp_query_include_loop', 'dont_include_wp_query_loop' );
```

The loop is includes after the template files, however. So it can be defined inside specific templates, with a simpler function

```php
add_action( 'wp_query_include_loop', '__return_false' );
```

Be careful, however, not to define this globally in your functions.php file unless an alternative loop is provided for the default templates, or they will not output.


# Templating

Custom templating allows developers to control every aspect of how queries are displayed.

## The Loop

The output of any custom query can be templated easily. By default, there is a few built in templates that will work out of the box with any theme. However, a certain amount of styling may be required. The real power is in the ability to define and use custom templates, as well as redefine how the default templates behave.

The templates are based on the default loop. The default loop is included after the template files, and contains all of the actions necessary for virtually any type of output. However, the inclusion of the default loop can be disabled using the `wp_query_include_loop` filter.

The default loop uses the normalized template name to define each action. The template name is normalized by replacing .php, spaces, dashes, and slashes with underscores. So a template specified as "My Custom Template" produces the action "my\_custom\_template". A template specified as "includes/my-custom-template.php" will produce the action "includes\_my\_custom\_template".

```php
do_action( "wp_query_{$template_name}_setup", $template_name, $context, $query, $atts );
/**
 * Begin our main loop
 */
do_action( "wp_query_before_{$template_name}_loop", $template_name, $context, $query, $atts );

if ( $query->have_posts() ) :

	do_action( "wp_query_before_{$template_name}_while", $template_name, $context, $query, $atts );

	while ( $query->have_posts() ) : $query->the_post();

		do_action( "wp_query_{$template_name}_content", $template_name, $context, $query, $atts );

	endwhile;

	do_action( "wp_query_after_{$template_name}_while", $template_name, $context, $query, $atts );

endif;

do_action( "wp_query_after_{$template_name}_loop", $template_name, $context, $query, $atts );
/**
 * End our main loop
 */
do_action( "wp_query_{$template_name}_teardown", $template_name, $context, $query, $atts );
```

## Example Templates

### Default Loop

An example template that outputs an ordered list, with post titles and a link. Since the template is included for each instance of the shortcode, it's important to wrap each function in a function\_exists check. Otherwise multiple instances of the same template could cause errors.

```php
/**
 * Template name: My Custom Template
 */ 

/**
 * Open the unordered list
 */
if( !function_exists( 'my_custom_template_before_while' ) ) {
	function my_custom_template_before_while( $template_name, $context, $query, $atts ) {
		echo '<ul class="my-custom-list">';
	}
	add_action( 'wp_query_before_my_custom_template_while', 'my_custom_template_before_while', 10, 4 );
}

/**
 * Output the content for each post
 */
if( !function_exists( 'my_custom_template_content' ) ) {
	function my_custom_template_content( $template_name, $context, $query, $atts ) {
		printf( '<li><a href="%s">%s</a></li>', get_the_permalink(), get_the_title() );
	}
	add_action( 'wp_query_my_custom_template_content', 'my_custom_template_content', 10, 4  );
}


/**
 * Close the unordered list
 */
if( function_exists( 'my_custom_template_after_while' ) ) {
	function my_custom_template_after_while( $template_name, $context, $query, $atts ) {
		echo '</ul>';
	}
	add_action( 'wp_query_after_my_custom_template_while', 'my_custom_template_after_while', 10, 4 );
}
```

### Custom Loop

An example of a template using a custom loop, instead of the default loop. Some developers may be more comfortable with this more familiar syntax.

```php
<?php add_filter( 'wp_query_include_loop', '__return_false' ); ?>

<?php if ( $query->have_posts() ) : ?>

	<ul class="my-custom-template">
		
		<?php while ( $query->have_posts() ) : $query->the_post(); ?>

		<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>

		<?php endwhile; ?>

	</ul>

<?php endif; ?>
```


# WPCL Beaver Extender

Beaver Extender is a free plugin that extends the power of Beaver Builder with several additional drag-and-drop modules, core extensions, and additional features.

Beaver Extender is a free plugin that extends the power of Beaver Builder with several custom drag-and-drop modules, including:

* Google Maps (requires google maps API key)
* Buttons
* Code Blocks (for displaying code snippets)
* Headings
* Icons
* Iframe
* Shortcodes
* Seperators
* Tabs
* Gravity Forms

##


# Getting Started


# Changelog


# Modules

Additional drag-and-drop Beaver Builder Modules

## Google Maps

The Google Maps module allows you to place a google map, using the [Google Maps Javascript API](https://developers.google.com/maps/documentation/javascript/tutorial). As such, it requires that you supply an [API Key](https://developers.google.com/maps/documentation/javascript/get-api-key) in order to render the maps.

### API Key

The Google Maps module allows you to place a google map, using the [Google Maps Javascript API](https://developers.google.com/maps/documentation/javascript/tutorial). As such, it requires that you supply an [API Key](https://developers.google.com/maps/documentation/javascript/get-api-key) in order to render the maps. To enable the Google Maps API:

1. Go to **settings** > **Beaver Builder**
2. Select the **Beaver Extender** tab
3. Paste your API key in the setting dialog

## Buttons

The buttons module is very similar to, and inspired by the buttons module in [Beaver Builder Pro](https://www.wpbeaverbuilder.com/pricing/). However, with a few opinionated differences. We weren't happy with the way way the built in buttons behaved in certain situations, and we were less than pleased with the difficulty styling the default buttons for our themes.

Many of the same options are available in our buttons module as there is in the core version:

* Color Options
* Style Options
* Alignment Options
* Icons / Icon Options
* Width Options
* Font Options

## Headings

## Icons

## Short Codes

## Tabs

## Gravity Forms

## Ninja Forms


# Extensions

Extensions enhance the core functionality of Beaver Builder

Unlike modules, extensions are not additional modules for use on the page. Instead, they are enhancements to the core Beaver Builder functionality that provide some additional functionality and flexibility.

## Custom CSS/SCSS

The Custom CSS/SCSS module allows you to add styles that are automatically scoped to individual Rows, Columns, and Modules! This allows you to make your designs and layouts as complex as necessary to achieve your desired results, even if specific styling options aren't available inside a node's native settings.

Regardless of the type of node the SCSS is being added to, you will find a new section in the **Advanced Tab**:

![The Custom SCSS Settings Pane](/files/-LUIO1mK5y0V0sDaH7Xy)

Any styles written in this area will automatically be scoped to the module they belong to. For instance, the above would produce:

```css
.fl-node-5b87f7a7a9d5d.fl-module-beicon .fl-module-content {
    // Paste Your Styles Here
}
```

Since SCSS is fully supported, you can nest styles, use variables, etc. 2 variables are always included:

* $medium-breakpoint
* $responsive-breakpoint

Which are mapped to the global Beaver Builder settings, and will be recompiled with the settings are changed.

#### Example

![Example custom SCSS](/files/-LUIR28kRuoOgECeIe0b)

\
Will Produce the following CSS, automatically compiled and output:

```css
.fl-node-5b87f7a7a9d5d.fl-module-beicon .fl-module-content .be-icon-wrap {
    opacity: 1;
}
@media (min-width: 641px) {
    .fl-node-5b87f7a7a9d5d.fl-module-beicon .fl-module-content .be-icon-wrap {
        position: relative;
    }
}
```

{% hint style="warning" %}
SCSS is compiled on your server. Some PHP configurations may cause unpredictable results
{% endhint %}

## Animations

By default, Beaver Builder enables animations on modules only. The Animation Extension enables both columns and rows to be animated as well.

Once enabled, you will find a new section for column and row settings under the **Advanced Tab** called **Animations**. Simple select the animation options you want, and that's it.

## Separators

{% hint style="info" %}
Coming Soon...
{% endhint %}

## Module Width

{% hint style="info" %}
Coming Soon...
{% endhint %}


# Genesis Scaffolding

{% hint style="info" %}
Coming Soon...
{% endhint %}


# FL Builder Blank Slate

{% hint style="info" %}
Coming Soon...
{% endhint %}


# WP Console

https\://github.com/bob-moore/wp-console

![](/files/-MR6l30GHbI1piR4aefX)


