HXSE — Code-First Search lets you define search filters with PHP arrays and output them with a simple shortcode. No JavaScript configuration required. Powered by htmx for seamless, no-reload filtering.
Why HXSE?
Filter Types
search — Keyword searchtaxonomy — Filter by taxonomy / categorymeta — Filter by custom field value or rangedate — Filter by yearrelation — Filter by related postUI Types
select — Dropdownradio — Radio buttonscheckbox — Multiple selectionrange — Min/max slider (for numeric meta fields)Pagination Modes
pager — Numbered page links with count displayloadmore — “Load more” buttonBasic Usage
`php
add_filter( ‘hxse_schemas’, function( $schemas ) {
$schemas[‘staff_search’] = [
‘post_type’ => ‘staff’,
‘filters’ => [
[‘key’ => ‘keyword’, ‘type’ => ‘search’, ‘label’ => ‘キーワード’],
[‘key’ => ‘department’, ‘type’ => ‘taxonomy’, ‘label’ => ‘部署’,
‘taxonomy’ => ‘department’,
‘ui’ => ‘checkbox’,
],
],
‘pagination’ => [
‘mode’ => ‘pager’,
‘per_page’ => 12,
],
‘template’ => ‘hxse-staff.php’,
];
return $schemas;
} );
`
`
[hxse id=”staff_search”]
`
This plugin bundles htmx (https://htmx.org/) for handling AJAX requests without page reloads. htmx is included locally within the plugin and does not make any external network requests. It is licensed under the BSD 2-Clause License.