{"id":13083,"date":"2022-11-04T21:15:55","date_gmt":"2022-11-04T21:15:55","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=13083"},"modified":"2023-07-19T09:53:37","modified_gmt":"2023-07-19T09:53:37","slug":"how-to-exclude-certain-terms-and-posts-in-ajax-search-query","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/","title":{"rendered":"How to Exclude Certain Terms and Posts in AJAX Search Query"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"excluding-certain-terms-and-posts-in-a-search-query-in-elementor\">Excluding Certain Terms and Posts in a Search Query in Elementor<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p class=\"style-title-numecal\">Open the page where you added the <a href=\"https:\/\/crocoblock.com\/widgets\/ajax-search\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>AJAX search<\/strong><\/a> widget with the <strong>Elementor<\/strong> editor.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/header-in-elementor.png\" alt=\"page with ajax search\">\n\n\n\n<p class=\"style-title-numecal\">Adjust the widget settings.<\/p>\n\n\n\n<p>Firstly, proceed to the <strong>Content<\/strong> tab and unfold the <strong>Search Query<\/strong> section.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/ajax-search-query.png\" alt=\"ajax search query\">\n\n\n\n<p>Now you need to specify the source (the search areas) over which the search will be done.<br><br>To add a source, simply click on the <strong>Plus<\/strong> button and select the needed one from the drop-down list. You can select as many source areas as you want.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/add-source.png\" alt=\"add a source to the search query\">\n\n\n\n<p>Below you will see two options: <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetsearch-how-to-include-certain-terms-in-ajax-search-widget-search-query\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Include<\/strong><\/a> and <strong>Exclude<\/strong>. Click on the <strong>Exclude<\/strong> one and determine the certain terms and whether you need specific posts.<br><br>In our example, we have posts with different categories and tags. We want to exclude the posts in the <strong>Interview<\/strong> and <strong>Awards<\/strong> categories from the search.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/books-posts.png\" alt=\"bookstore posts\">\n\n\n\n<p>Under the <strong>Terms<\/strong>, start typing the needed categories or tags.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/exclude-categories.png\" alt=\"added terms\">\n\n\n\n<p>To exclude a specific post from the search, just start entering its title under the <strong>Posts<\/strong>.<\/p>\n\n\n\n<img src=https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/exclude-specific-post.png alt=\"exclude a specific post\">\n\n\n\n<p class=\"style-title-numecal\"> After that, save the settings and check the search on the front end.<\/p>\n\n\n\n<p>The needed posts were successfully excluded from the search results.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/search-result.png\" alt=\"search results on the front end\">\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"excluding-the-posts-from-the-search-results-in-gutenberg\">Excluding the Posts from the Search Results in Gutenberg<\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p><em>JetSearch<\/em> works not only with the Elementor page builder. This plugin allows applying a <strong>Search <\/strong>block using Gutenberg as well.<br><br>Open the page in the default WordPress editor. Click on the \u201c<strong>Add block<\/strong>\u201d button and find the <strong>AJAX Search<\/strong> block.<\/p>\n\n\n\n<img src=https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/search-block.png\" alt=\"ajax search block\">\n\n\n\n<p>Proceed to the <strong>Block<\/strong> tab and firstly unfold the <strong>Search Query<\/strong> section. Here you need the set the search area.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/search-query-area.png\" alt=\"search query area\">\n\n\n\n<p>Scroll down and unfold the next section called <strong>Search Query<\/strong> <strong>Includes\/Excludes<\/strong>.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/block-search-query-settings.png\" alt=\"search query settings\">\n\n\n\n<p>The process is similar to the one described in the first part of this tutorial for the Elementor editor.<br><br>Simply add the terms under <strong>Exclude<\/strong> and select a specific post if needed.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/added-terms-to-the-exclude.png\" alt=\"added terms to the exclude\">\n\n\n\n<p>Don\u2019t forget to click the \u201c<strong>Update<\/strong>\u201d button and preview the search block on the front end. <\/p>\n<\/div><\/div>\n\n\n\n<p>Now you know how to exclude some terms and posts in a search query with the <strong>AJAX Search<\/strong> widget.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial provides a detailed guide about setting search excluding certain terms and posts using the JetSearch AJAX Search widget.<\/p>\n","protected":false},"author":1,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[430],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Exclude Certain Terms and Posts in AJAX Search Query - Help Center<\/title>\n<meta name=\"description\" content=\"Find out how to exclude certain terms and posts in AJAX Search Query.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Exclude Certain Terms and Posts in AJAX Search Query - Help Center\" \/>\n<meta property=\"og:description\" content=\"Find out how to exclude certain terms and posts in AJAX Search Query.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-19T09:53:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/header-in-elementor.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/\",\"name\":\"How to Exclude Certain Terms and Posts in AJAX Search Query - Help Center\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2022-11-04T21:15:55+00:00\",\"dateModified\":\"2023-07-19T09:53:37+00:00\",\"description\":\"Find out how to exclude certain terms and posts in AJAX Search Query.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/articles\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Exclude Certain Terms and Posts in AJAX Search Query\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Exclude Certain Terms and Posts in AJAX Search Query - Help Center","description":"Find out how to exclude certain terms and posts in AJAX Search Query.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/","og_locale":"en_US","og_type":"article","og_title":"How to Exclude Certain Terms and Posts in AJAX Search Query - Help Center","og_description":"Find out how to exclude certain terms and posts in AJAX Search Query.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/","og_site_name":"Help Center","article_modified_time":"2023-07-19T09:53:37+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2022\/11\/header-in-elementor.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/","name":"How to Exclude Certain Terms and Posts in AJAX Search Query - Help Center","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2022-11-04T21:15:55+00:00","dateModified":"2023-07-19T09:53:37+00:00","description":"Find out how to exclude certain terms and posts in AJAX Search Query.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetsearch\/how-to-exclude-certain-terms-and-posts-in-ajax-search-query\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/crocoblock.com\/knowledge-base\/articles\/"},{"@type":"ListItem","position":3,"name":"How to Exclude Certain Terms and Posts in AJAX Search Query"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article\/13083"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=13083"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=13083"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=13083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}