12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Aug 19, 2019

FacetWP and Pagination

Sridhar Katakam

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 to this is to replace the default pagination with FacetWP’s.

This tutorial provides the steps to fix this pagination issue on archive pages in Oxygen when using FacetWP.

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 use pre_get_posts filter to set your desired number of posts per page on your archives by following this example.

Step 2

Edit your archive Template in Oxygen editor.

In Easy Posts’ Template CSS add

%%EPID%% .oxy-easy-posts-pages {
  display: none;

Below Easy Posts, add a Shortcode component having this shortcode:

[facetwp pager="true"]