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 ($37/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
magnifiercross
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: