Updated on 13 Dec 2023
Pagination output by a WordPress theme or plugin will not usually work i.e., get automatically updated after the results are filtered using FacetWP.
The solution is to replace the default pagination with FacetWP’s and add facetwp-template
class to the parent of the looping posts i.e., Easy Posts or Repeater.
This
Step 1
Your archive pages should generally speaking, respect the number of posts per page setting in WordPress (at Settings > Reading).
If for whatever reason, that is not working pre_get_posts
Step 2
Create a Pager type of facet.
Note: “Repeater Pagination” is just a label. If you are using Easy Posts, you could name it “Easy Posts Pagination”.
Save and click on Re-index.
Step 3
Edit your archive Template in Oxygen editor.
Add an Easy Posts or Repeater component inside a Section.
Leave the query as default.
In Easy Posts’ Template CSS add
%%EPID%% .oxy-easy-posts-pages {
display: none;
}
If using a Repeater, add this in a custom stylesheet:
.facetwp-template .oxy-repeater-pages-wrap {
display: none;
}
Below Easy Posts or Repeater, add a Shortcode component having your Pager shortcode.
Ex.:
[facetwp facet="repeater_pagination"]
Step 4
Select the Easy Posts or Repeater component and add this class: facetwp-template
References
https://facetwp.com/help-center/listing-templates/wp-archive-page/#how-it-works