FacetWP – Elementor Integration
Following the completion of the installation, additional setup steps for this add-on are not required. After installation, relevant Elementor listing modules will each show an additional “FacetWP” setting on their respective settings pages. Instructing FacetWP to utilise the specified listing by toggling this option to the “Enabled” position.
Using Elementor pagination
FacetWP will identify the pagination that you are using with Elementor and convert it so that it can be used with AJAX filtering if you are using this pagination. You may put this pagination in a Posts or Archive Posts widget.
Nevertheless, this will only be successful with the pagination choices that offer numbered pagination.
The pagination types “Load on Click” and “Infinite Scroll” are incompatible with FacetWP and will not operate. (As a side note, FacetWP is not compatible with any kind of pagination that uses the phrase “infinite load.”)
You also have the option to not utilise the pagination that Elementor provides and instead add a Pager facet. This facet provides various different pager kinds, one of which is a “Load more” type.
Block FacetWP from using the wrong post widget query
Utilizing the query id option, you may prevent FacetWP from using a post widget query that it shouldn’t be using in Elementor. This is useful if FacetWP is incorrectly identifying the query to use.
In the Elementer widget, assign the value “block facet” to the ‘Query ID’ setting, and then add the following line of code to the functions.php file of your (child) theme:
Force FacetWP to use a specific post widget query
You have the option of compelling FacetWP to utilise a certain query ID generated by Elementor. In the Elementer widget, assign the value “use facet” to the ‘Query ID’ setting, and then include the following code in the functions.php file of your (child) theme.
Prevent page scroll with the AEP “Post Blocks Adv” widget
The “Disable Scroll to Top on Load” option, which can be found in the “Pagination” section of the Post Blocks Adv widget, may be used to turn off the scrolling that occurs while an AJAX page loads.
Be warned that the “Pagination” section can disappear if you have the “Infinite Scroll” option turned on in the “Layout” area. This is something you should keep in mind. If that is the case, you will need to disable the option for infinite scrolling, then navigate to the section for pagination, and turn on the option for “disabling scroll to top on load.”
Because FacetWP does not allow any kind of limitless scrolling, it is in your best interest to make sure that the Infinite Scroll option is turned off. The Pager facet is the next best thing; it possesses a pager type that creates a “load more” button and functions in a manner that is analogous to endless scrolling.
Customizing the Elementor Pro Posts widget query
If you are utilising Elementor Pro with a Posts widget and want further control over the query, you may make use of the Custom Query Filter hook that is included with Elementor.
This hook operates in a manner that is analogous to that of WordPress’s pre get posts hook. It makes the WP Query object available to you, enabling you to modify the query in any way that suits your needs.
On category archive pages only, the following coding sample demonstrates how to implement a backup sorting technique by replacing the original orderby query argument:
There are no reviews yet.