[WordPress] 外掛分享: HXSE — Code-First Search

首頁外掛目錄 › HXSE — Code-First Search
WordPress 外掛 HXSE — Code-First Search 的封面圖片
全新外掛
安裝啟用
尚無評分
5 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v1.9.0 上架:2026-06-17

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.9.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「HXSE — Code-First Search」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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?

Code-first — Define everything in PHP arrays. Version-control friendly.
No page reloads — htmx handles all filtering and pagination seamlessly.
AI-friendly — Simple, consistent schema structure that AI agents can read and write.
No dependencies — htmx is bundled. No jQuery required.
Fully customizable — All styles use CSS custom properties (design tokens). Ships with DESIGN.md for a complete variable reference and customization examples.

Filter Types

search — Keyword search
taxonomy — Filter by taxonomy / category
meta — Filter by custom field value or range
date — Filter by year
relation — Filter by related post
select — Filter external-source data by field value (api / rss / xml, v1.8.0+)

UI Types

select — Dropdown
radio — Radio buttons
checkbox — Multiple selection
range — Min/max slider (for numeric meta fields)

Pagination Modes

pager — Numbered page links with count display
loadmore — “Load more” button

Basic Usage
Define a schema in your theme’s functions.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;
} );

Then place the shortcode on any page:
[hxse id="staff_search"]

External Services
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.

htmx: https://htmx.org/
htmx License: https://github.com/bigskysoftware/htmx/blob/master/LICENSE

延伸相關外掛

文章
Filter
Apply Filters
Mastodon