12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Jan 16, 2020

How to make FacetWP work with Oxygen’s Repeater on static Pages

Sridhar Katakam

FacetWP is a great plugin for adding custom facets or filters to filter the list of entries in WordPress by different criterion.

It is quite straightforward and works out of the box on default or main queries for example, on archives. But with secondary queries on non-archive pages like static Pages it needs a little nudge in the right direction.

This members-only tutorial provides the steps to make FacetWP work i.e., be able to filter the entries output by Oxygen's Repeater component on static Pages.

(ignore the post marked Private. It will not appear for visitors)

Summary of steps:

  1. Use manual WP Query in the Repeater.
  2. Tell FacetWP to ignore ct_template post type.
  3. Hide default pagination and add a FacetWP pager facet for working pagination.

Step 1

Install and activate FacetWP.

Go to Settings > FacetWP.

Create your desired facet.

Ex.:

Save changes.

Click Re-index button.

Add another facet of Pager type.

Step 2

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Tell FacetWP to ignore ct_template post type

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right