{"id":14445,"date":"2025-11-03T17:57:40","date_gmt":"2025-11-03T15:57:40","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?post_type=documentation&#038;p=14445"},"modified":"2025-11-03T18:05:52","modified_gmt":"2025-11-03T16:05:52","slug":"set-a-minimum-length-for-live-searches","status":"publish","type":"documentation","link":"https:\/\/creativethemes.com\/blocksy\/docs\/code-snippets\/set-a-minimum-length-for-live-searches\/","title":{"rendered":"Set a Minimum Length for Live Searches"},"content":{"rendered":"\n<p>Blocksy includes a powerful&nbsp;<strong>live search<\/strong>&nbsp;feature that displays real-time search results as you type, creating a dynamic and engaging experience for your visitors. However, on some hosting environments or slower systems, this instant feedback can impact performance since the search runs with every keystroke.<\/p>\n\n\n\n<p>If you&#8217;d like to optimise performance by requiring a minimum number of characters before the live search activates, you can use the following PHP filter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter('blocksy:search-form:min-length', function () {\n\treturn 3;\n});<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Blocksy includes a powerful&nbsp;live search&nbsp;feature that displays real-time search results as you type, creating a dynamic and engaging experience for your visitors. However, on some hosting environments or slower systems, this instant feedback can impact performance since the search runs with every keystroke. If you&#8217;d like to optimise performance by requiring a minimum number of [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"doc_categories":[125],"class_list":["post-14445","documentation","type-documentation","status-publish","hentry","doc_categories-code-snippets"],"blocksy_meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/14445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/documentation"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=14445"}],"version-history":[{"count":2,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/14445\/revisions"}],"predecessor-version":[{"id":14448,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/14445\/revisions\/14448"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=14445"}],"wp:term":[{"taxonomy":"doc_categories","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/doc_categories?post=14445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}