Title: HXSE — Code-First Search
Author: youheiokubo
Published: <strong>June 18, 2026</strong>
Last modified: June 18, 2026

---

Search plugins

![](https://ps.w.org/hxse-code-first-search/assets/banner-772x250.png?rev=3576510)

![](https://ps.w.org/hxse-code-first-search/assets/icon-256x256.png?rev=3576510)

# HXSE — Code-First Search

 By [youheiokubo](https://profiles.wordpress.org/youheiokubo/)

[Download](https://downloads.wordpress.org/plugin/hxse-code-first-search.1.0.1.zip)

 * [Details](https://wordpress.org/plugins/hxse-code-first-search/#description)
 * [Reviews](https://wordpress.org/plugins/hxse-code-first-search/#reviews)
 *  [Installation](https://wordpress.org/plugins/hxse-code-first-search/#installation)
 * [Development](https://wordpress.org/plugins/hxse-code-first-search/#developers)

 [Support](https://wordpress.org/support/plugin/hxse-code-first-search/)

## Description

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.

**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

**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**

    ```
    `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”]
 `

### 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

## Installation

 1. Upload the `hxse-code-first-search` folder to `/wp-content/plugins/`.
 2. Activate the plugin through the **Plugins** menu in WordPress.
 3. Add `hxse_schemas` filter to your theme’s `functions.php` or a custom plugin.
 4. Add `[hxse id="your_schema_id"]` shortcode to any page.

## FAQ

### Do I need to write JavaScript?

No. HXSE handles all htmx configuration automatically. You only write PHP to define
your filters.

### Can I use multiple search instances on one page?

Yes. Use the `prefix` option in `url_params` to avoid parameter conflicts.

### How do I customize the result template?

Create `hxse/your-template.php` in your theme directory and specify it in the schema’s`
template` key.

### Does it work with custom fields from HXFE or ACF?

Yes. Use `type: 'meta'` with the appropriate `meta_key`.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“HXSE — Code-First Search” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ youheiokubo ](https://profiles.wordpress.org/youheiokubo/)

[Translate “HXSE — Code-First Search” into your language.](https://translate.wordpress.org/projects/wp-plugins/hxse-code-first-search)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/hxse-code-first-search/),
check out the [SVN repository](https://plugins.svn.wordpress.org/hxse-code-first-search/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/hxse-code-first-search/)
by [RSS](https://plugins.trac.wordpress.org/log/hxse-code-first-search/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * Initial release.
 * Filter types: search, taxonomy, meta, date, relation.
 * UI types: select, radio, checkbox, range.
 * URL parameter sync with browser history support.

## Meta

 *  Version **1.0.0**
 *  Last updated **8 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.0**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [ajax](https://wordpress.org/plugins/tags/ajax/)[custom post type](https://wordpress.org/plugins/tags/custom-post-type/)
   [filter](https://wordpress.org/plugins/tags/filter/)[search](https://wordpress.org/plugins/tags/search/)
   [shortcode](https://wordpress.org/plugins/tags/shortcode/)
 *  [Advanced View](https://wordpress.org/plugins/hxse-code-first-search/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/hxse-code-first-search/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/hxse-code-first-search/reviews/)

## Contributors

 *   [ youheiokubo ](https://profiles.wordpress.org/youheiokubo/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/hxse-code-first-search/)