{"id":328489,"date":"2026-06-18T03:33:19","date_gmt":"2026-06-18T03:33:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/hxse-code-first-search\/"},"modified":"2026-06-18T03:31:53","modified_gmt":"2026-06-18T03:31:53","slug":"hxse-code-first-search","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/hxse-code-first-search\/","author":23511001,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.1","tested":"7.0","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"HXSE \u2014 Code-First Search","header_author":"Youhei Okubo","header_description":"Code-first search & filter for WordPress. Define filters with PHP arrays, output with a shortcode. Powered by htmx \u2014 no page reloads.","assets_banners_color":"050719","last_updated":"2026-06-18 03:31:53","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/okuboyouhei\/hxse-code-first-search","header_author_uri":"https:\/\/zenn.dev\/youheiokubo","rating":0,"author_block_rating":0,"active_installs":0,"downloads":27,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"youheiokubo","date":"2026-06-18 03:32:41"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3576510,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3576510,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3576510,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3576510,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[221,1794,2236,944,80],"plugin_category":[43,59],"plugin_contributors":[266517],"plugin_business_model":[],"class_list":["post-328489","plugin","type-plugin","status-publish","hentry","plugin_tags-ajax","plugin_tags-custom-post-type","plugin_tags-filter","plugin_tags-search","plugin_tags-shortcode","plugin_category-customization","plugin_category-utilities-and-tools","plugin_contributors-youheiokubo","plugin_committers-youheiokubo"],"banners":{"banner":"https:\/\/ps.w.org\/hxse-code-first-search\/assets\/banner-772x250.png?rev=3576510","banner_2x":"https:\/\/ps.w.org\/hxse-code-first-search\/assets\/banner-1544x500.png?rev=3576510","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/hxse-code-first-search\/assets\/icon-128x128.png?rev=3576510","icon_2x":"https:\/\/ps.w.org\/hxse-code-first-search\/assets\/icon-256x256.png?rev=3576510","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>HXSE \u2014 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.<\/p>\n\n<p><strong>Why HXSE?<\/strong><\/p>\n\n<ul>\n<li><strong>Code-first<\/strong> \u2014 Define everything in PHP arrays. Version-control friendly.<\/li>\n<li><strong>No page reloads<\/strong> \u2014 htmx handles all filtering and pagination seamlessly.<\/li>\n<li><strong>AI-friendly<\/strong> \u2014 Simple, consistent schema structure that AI agents can read and write.<\/li>\n<li><strong>No dependencies<\/strong> \u2014 htmx is bundled. No jQuery required.<\/li>\n<\/ul>\n\n<p><strong>Filter Types<\/strong><\/p>\n\n<ul>\n<li><code>search<\/code> \u2014 Keyword search<\/li>\n<li><code>taxonomy<\/code> \u2014 Filter by taxonomy \/ category<\/li>\n<li><code>meta<\/code> \u2014 Filter by custom field value or range<\/li>\n<li><code>date<\/code> \u2014 Filter by year<\/li>\n<li><code>relation<\/code> \u2014 Filter by related post<\/li>\n<\/ul>\n\n<p><strong>UI Types<\/strong><\/p>\n\n<ul>\n<li><code>select<\/code> \u2014 Dropdown<\/li>\n<li><code>radio<\/code> \u2014 Radio buttons<\/li>\n<li><code>checkbox<\/code> \u2014 Multiple selection<\/li>\n<li><code>range<\/code> \u2014 Min\/max slider (for numeric meta fields)<\/li>\n<\/ul>\n\n<p><strong>Pagination Modes<\/strong><\/p>\n\n<ul>\n<li><code>pager<\/code> \u2014 Numbered page links with count display<\/li>\n<li><code>loadmore<\/code> \u2014 \"Load more\" button<\/li>\n<\/ul>\n\n<p><strong>Basic Usage<\/strong><\/p>\n\n<pre><code>`php\n<\/code><\/pre>\n\n<p>add_filter( 'hxse_schemas', function( $schemas ) {\n    $schemas['staff_search'] = [\n        'post_type' =&gt; 'staff',\n        'filters'   =&gt; [\n            ['key' =&gt; 'keyword',    'type' =&gt; 'search',   'label' =&gt; '\u30ad\u30fc\u30ef\u30fc\u30c9'],\n            ['key' =&gt; 'department', 'type' =&gt; 'taxonomy',  'label' =&gt; '\u90e8\u7f72',\n                'taxonomy' =&gt; 'department',\n                'ui'       =&gt; 'checkbox',\n            ],\n        ],\n        'pagination' =&gt; [\n            'mode'     =&gt; 'pager',\n            'per_page' =&gt; 12,\n        ],\n        'template' =&gt; 'hxse-staff.php',\n    ];\n    return $schemas;\n} );\n    `<\/p>\n\n<pre><code>`\n<\/code><\/pre>\n\n<p>[hxse id=\"staff_search\"]\n    `<\/p>\n\n<h3>External Services<\/h3>\n\n<p>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.<\/p>\n\n<ul>\n<li>htmx: https:\/\/htmx.org\/<\/li>\n<li>htmx License: https:\/\/github.com\/bigskysoftware\/htmx\/blob\/master\/LICENSE<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>hxse-code-first-search<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress.<\/li>\n<li>Add <code>hxse_schemas<\/code> filter to your theme's <code>functions.php<\/code> or a custom plugin.<\/li>\n<li>Add <code>[hxse id=\"your_schema_id\"]<\/code> shortcode to any page.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20need%20to%20write%20javascript%3F\"><h3>Do I need to write JavaScript?<\/h3><\/dt>\n<dd><p>No. HXSE handles all htmx configuration automatically. You only write PHP to define your filters.<\/p><\/dd>\n<dt id=\"can%20i%20use%20multiple%20search%20instances%20on%20one%20page%3F\"><h3>Can I use multiple search instances on one page?<\/h3><\/dt>\n<dd><p>Yes. Use the <code>prefix<\/code> option in <code>url_params<\/code> to avoid parameter conflicts.<\/p><\/dd>\n<dt id=\"how%20do%20i%20customize%20the%20result%20template%3F\"><h3>How do I customize the result template?<\/h3><\/dt>\n<dd><p>Create <code>hxse\/your-template.php<\/code> in your theme directory and specify it in the schema's <code>template<\/code> key.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20custom%20fields%20from%20hxfe%20or%20acf%3F\"><h3>Does it work with custom fields from HXFE or ACF?<\/h3><\/dt>\n<dd><p>Yes. Use <code>type: 'meta'<\/code> with the appropriate <code>meta_key<\/code>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Filter types: search, taxonomy, meta, date, relation.<\/li>\n<li>UI types: select, radio, checkbox, range.<\/li>\n<li>URL parameter sync with browser history support.<\/li>\n<\/ul>","raw_excerpt":"Code-first search &amp; filter for WordPress. Define filters with PHP arrays, output with a shortcode. Powered by htmx \u2014 no page reloads.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/328489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=328489"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/youheiokubo"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=328489"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=328489"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=328489"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=328489"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=328489"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=328489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}