Switch language한국어
Back to the list

How to Filter and Sort Posts by Custom Field Value Using JetSmartFilters + Bricks Builder

TL;DR AI

Key summary

2 min read
  1. A tutorial shows how to use JetSmartFilters with Bricks Builder to filter posts by a selected custom field and then sort the results by that field’s numeric value.

  2. It uses a radio control that passes a plain query variable into a Bricks query loop, rather than relying on native JetSmartFilters sorting.

  3. A PHP hook in functions.php filters out posts missing the chosen meta field and orders the rest in descending order.

  4. The approach offers a practical workaround for combining filtering and custom-field sorting in WordPress when built-in support is limited.

Read the original