This add-on lets you display facets alongside Elementor Pro listings.

Supported widgets

Widget Plugin
Posts Elementor Pro
Ultimate Addons for Elementor
PowerPack for Elementor
Premium Addons for Elementor (Blog widget)
Archive Posts Elementor Pro
WooCommerce Products Elementor Pro
Ultimate Addons for Elementor
PowerPack for Elementor
Premium Addons for Elementor
WooCommerce Archive Products Elementor Pro
Listing Grid JetEngine
Post Blocks AnyWhere Elementor Pro (integration built into AEP)
Post Blocks Adv AnyWhere Elementor Pro (integration built into AEP). More info on the integration with FacetWP can be found on this AEP page.
Note: to disable the scroll on page load, see the instructions below.

Usage

After installation, there is no further configuration needed for this add-on. When it is installed, compatible Elementor listing modules will display an extra “FacetWP” setting. Toggling this setting to “Enabled” tells FacetWP to use the desired listing:

Facet filters and other display shortcodes can be added with Elementor’s shortcode widget.

FacetWP on WP archive templates

Elementer archive widgets

FacetWP can also be enabled on WP archive templates created with the Elementor Theme builder.

The Archive posts widget (for posts, pages, and custom post types) and the Archive products widget (for Woocommerce product archives) can be enabled in their settings for FacetWP in the same way as the above widgets, while automatically using the archive query for the results.

Pagination

In most cases, FacetWP will detect Elementor’s numbered pagination and convert it for use with filtering. However, you can turn off the module’s pagination and add a pager facet instead.

Blocking FacetWP from using the wrong post widget query

block_facet Query ID in Elementor

If FacetWP is identifying the wrong query in Elementor, you can use the query_id setting to block FacetWP from using a post widget query that it shouldn’t.

Give the ‘Query ID’ setting in the Elementer widget a value of “block_facet”, and add this code to your (child) theme’s functions.php:

add_action( 'elementor/query/block_facet', function( $query ) {
  $query->set( 'facetwp', false );
} );

Forcing FacetWP to use a specific post widget query

use_facet Query ID in Elementor

You can force FacetWP to use a specific Elementor query ID. Give the ‘Query ID’ setting in the Elementer widget a value of “use_facet”, and add this code to your (child) theme’s functions.php:

add_action( 'elementor/query/use_facet', function( $query ) {
  $query->set( 'facetwp', true );
} );

add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
  if ( true !== $query->get( 'facetwp', false ) ) {
    return false;
  }
  return $is_main_query;
}, 10, 2 );

Prevent page scroll with the AEP “Post Blocks Adv” widget

AnyWhere Elementor Pro Post Blocks Adv widget - preventing scroll on page loadIf you are using the AnyWhere Elementor Pro “Post Blocks Adv” widget (which has FacetWP integration), you may see the page scroll to the top of the results after interacting with facets.

This scroll on (AJAX) page load can be disabled by the “Disable Scroll to Top on Load” option, located under the “Pagination” section of the Post Blocks Adv widget.

Be aware that this Pagination section can be hidden if you happen to have the “Infinite Scroll” option enabled in the “Layout” section. If that is the case, disable the Infinite Scroll option, then go to the Pagination section and enable the “Disable Scroll to Top on Load” option.

It’s best to then keep the Infinite Scroll option disabled because FacetWP does not support any form of infinite scroll. The closest thing is the Pager facet, which has a pager type that generates a “load more” button, working similar to infinite scroll.

Changelog

1.6.7

  • New added support for "Premium Addons for Elementor" [Posts] and [WooCommerce] widgets

1.6.6

  • Fixed refined the JS refresh handler to (hopefully) account for edge cases

1.6.5

  • Fixed better compatibility with Elementor toggles and other dynamic elements

1.6.4

  • Fixed Elementor no longer runs a separate "theme builder template" query, so we're adjusting our logic accordingly

1.6.3

  • Improved removed jQuery dependency

1.6.2

  • Fixed prevent error when FacetWP is disabled

1.6.1

  • Fixed issue with WC Products widget not detecting the right query

1.6.0

  • Important this version requires FacetWP 3.6.0 or above
  • Improved compatibility with FacetWP 3.6.0+ and Elementor 3.0+

See also