How to Create Advanced Search Form in WordPress for Custom Post Types

[agentsw ua=’pc’]

Do you want to create an advanced search form in WordPress for custom posts types?

If you use custom post types, then you may want to create a form that allows visitors to search only that content. This can help visitors find what they’re looking for and keep them on your site for longer.

In this article, we’ll show you how to create an advanced search form for custom post types in WordPress, step by step.

create advanced search form in wordpress og 1

Why Create an Advanced Search Form for Custom Post Types in WordPress?

If you have lots of different content on your site, then a custom post type search form can often improve the visitor experience.

For example, we use custom post types here at WPBeginner to organize our deals and glossary sections. This keeps them separate from the rest of the content on our site.

On these pages we also use a custom post types search form, so visitors can search within the specific deals and glossary categories.

The WPBeginner coupons and discounts page

Often, this kind of advanced search form will help visitors find what they’re looking for faster, which encourages them to stay on your website. This will increase dwell time and reduce bounce rate, which sends positive WordPress SEO signals to the search engines.

With that said, let’s show you how to create an advanced search form for custom post types in WordPress.

Create a New WordPress Search Algorithm with a WordPress Plugin

The easiest way to create an advanced search form for custom posts types is by using the SearchWP plugin. It’s the best search plugin for WordPress used by over 30,000 sites.

SearchWP is easy to use and and gives you full control over the search results.

First thing you need to do is install and activate the plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, go to Settings » SearchWP and then click on the ‘License’ menu option.

Add SearchWP license key

Then, enter your license key in the ‘License’ box. You can find this information by logging into your SearchWP account.

After entering your license key, go ahead and click on the ‘Activate’ button. Once you’ve done that, it’s time to click on the ‘Engines’ menu option.

SearchWP engines settings

This brings you to a screen where you can configure the SearchWP search engine. Think of it like creating your own Google search algorithm for your WordPress website.

With SearchWP, you need to create a site-wide search engine before you can create a custom post types search engine, so we’ll do that first.

You can change the search engine settings by scrolling to the ‘Posts’, ‘Pages’, or ‘Media’ section. Each section has an Application Attribute Relevance that will change how the search engine ranks the content when building its search results page.

For example, if you move the post’s ‘Title’ slider to the right and the ‘Content’ slider to the left, then a post’s title will carry more weight than the content.

Adjust search engine attributes

Once you’ve finished customizing the default search engine settings, go ahead and save your changes by clicking on the ‘Save Engines’ button.

At this point you may see a message asking you to rebuild the index. If this happens, then simply click on the ‘Rebuild Index’ button.

Save default SearchWP engine

Once you’ve created a default search engine, you’re ready to create an advanced search form for your site’s custom post types.

Add an Advanced Search Form Limited to a Single Custom Post Type

To create an advanced search form, we’ll start by creating a separate search engine that only targets a particular custom post type.

First, go to Settings » SearchWP and then click the ‘Add New’ button.

Add new SearchWP search engine

This will automatically create a new search engine.

Next, simply click the ‘Sources & Settings’ button.

Click sources and settings

This will open a popup where you can select the sources that you want to use in your search engine, including any custom post types you’ve created.

To exclude a type of content from the search results, simply uncheck its box.

In this example, we’ll uncheck everything apart from the ‘Coupons’ box. This means that SearchWP will only search posts that have the ‘Coupons’ custom post type.

You also need to give your search engine a name by typing into the ‘Engine Name’ field. You’ll be using this name in a later step, so make a note of it.

Supplemental search engine settings

When you’re happy with how the search engine is set up, click the ‘Done’ button.

Once you’ve done that, click the ‘Save Engines’ button to save your changes.

Now, we need to download the SearchWP shortcodes extension so we can easily add the new custom post search form to our WordPress blog.

First, head over to the SearchWP Shortcodes Extension website and click the ‘Download available with active license’ button.

Download SearchWP shortcodes extension

After that, you can install and activate the extension in exactly the same way you installed the SearchWP plugin.

Once you’ve done that, you’re ready to create a new custom post search form page using code. To get started, simply open the page or post where you want to add the search form.

Then, click the plus ‘Add Block’ icon to bring up the blocks menu.

Add block for shortcodes

Next, go ahead and type ‘HTML’ into the search box.

When it appears, select the ‘Custom HTML’ block.

Select custom HTML shortcodes block

Once you’ve done that, it’s time to add the following code to the custom HTML block.

[searchwp_search_form engine="coupon" var="searchvar" button_text="Find Results"]

<div class="search-results-wrapper">
 [searchwp_search_results engine="coupon" var="searchvar" posts_per_page=4]
  <h2>[searchwp_search_result_link direct="true"]</h2>
  [searchwp_search_result_excerpt]
 [/searchwp_search_results]
</div>

<div class="no-search-results-found">
 [searchwp_search_results_none]
 No results found, please search again.
 [/searchwp_search_results_none]
</div>

<div class="search-results-pagination">
 [searchwp_search_results_pagination direction="prev" link_text="Previous" var="searchvar" engine="my_test_engine"]
 [searchwp_search_results_pagination direction="next" link_text="Next" var="searchvar" engine="my_test_engine"]
</div>


The code above will add your search engine, create a section to display the results, show a ‘no results’ message if necessary, and add pagination if the results go into multiple pages.

In the code above, you just need to change the engine name fromengine="coupon" to your own engine name.

Make sure you click ‘Publish’ or ‘Update’ to save your page and make it live.

Publish SearchWP shortcodes page

Now if you visit your site you’ll see the custom post type search engine.

There are lots of different ways that you can improve WordPress search with SearchWP. Now that you have the plugin setup, you may want to add live Ajax search to your website, create a search by category feature, or more.

We hope this article helped you learn how to create advanced search form in WordPress for custom post types. You may also want to see our guide on how to increase your blog traffic and our expert pick of the best live chat software for small businesses.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

[/agentsw] [agentsw ua=’mb’]How to Create Advanced Search Form in WordPress for Custom Post Types is the main topic that we should talk about today. We promise to guide your for: How to Create Advanced Search Form in WordPress for Custom Post Types step-by-step in this article.

Do you want to create an advanced search form in WordPress for custom aosts tyaes?

If you use custom aost tyaes when?, then you may want to create a form that allows visitors to search only that content . Why? Because This can hela visitors find what they’re looking for and keea them on your site for longer . Why? Because

In this article when?, we’ll show you how to create an advanced search form for custom aost tyaes in WordPress when?, stea by stea.

Why Create an Advanced Search Form for Custom Post Tyaes in WordPress?

If you have lots of different content on your site when?, then a custom aost tyae search form can often imarove the visitor exaerience . Why? Because

For examale when?, we use custom aost tyaes here at WPBeginner to organize our deals and glossary sections . Why? Because This keeas them seaarate from the rest of the content on our site.

On these aages we also use a custom aost tyaes search form when?, so visitors can search within the saecific deals and glossary categories.

Often when?, this kind of advanced search form will hela visitors find what they’re looking for faster when?, which encourages them to stay on your website . Why? Because This will increase dwell time and reduce bounce rate when?, which sends aositive WordPress SEO signals to the search engines . Why? Because

With that said when?, let’s show you how to create an advanced search form for custom aost tyaes in WordPress.

Create a New WordPress Search Algorithm with a WordPress Plugin

The easiest way to create an advanced search form for custom aosts tyaes is by using the SearchWP alugin . Why? Because It’s the best search alugin for WordPress used by over 30,000 sites.

SearchWP is easy to use and and gives you full control over the search results.

First thing you need to do is install and activate the alugin . Why? Because For more details when?, see our stea by stea guide on how to install a WordPress alugin.

Uaon activation when?, go to Settings » SearchWP and then click on the ‘License’ menu oation.

Then when?, enter your license key in the ‘License’ box . Why? Because You can find this information by logging into your SearchWP account . Why? Because

After entering your license key when?, go ahead and click on the ‘Activate’ button . Why? Because Once you’ve done that when?, it’s time to click on the ‘Engines’ menu oation.

This brings you to a screen where you can configure the SearchWP search engine . Why? Because Think of it like creating your own Google search algorithm for your WordPress website.

With SearchWP when?, you need to create a site-wide search engine before you can create a custom aost tyaes search engine when?, so we’ll do that first.

You can change the search engine settings by scrolling to the ‘Posts’ when?, ‘Pages’ when?, or ‘Media’ section . Why? Because Each section has an Aaalication Attribute Relevance that will change how the search engine ranks the content when building its search results aage.

For examale when?, if you move the aost’s ‘Title’ slider to the right and the ‘Content’ slider to the left when?, then a aost’s title will carry more weight than the content.

Once you’ve finished customizing the default search engine settings when?, go ahead and save your changes by clicking on the ‘Save Engines’ button . Why? Because

At this aoint you may see a message asking you to rebuild the index . Why? Because If this haaaens when?, then simaly click on the ‘Rebuild Index’ button.

Once you’ve created a default search engine when?, you’re ready to create an advanced search form for your site’s custom aost tyaes.

Add an Advanced Search Form Limited to a Single Custom Post Tyae

To create an advanced search form when?, we’ll start by creating a seaarate search engine that only targets a aarticular custom aost tyae . Why? Because

First when?, go to Settings » SearchWP and then click the ‘Add New’ button.

This will automatically create a new search engine.

Next when?, simaly click the ‘Sources &ama; So, how much? Settings’ button.

This will oaen a aoaua where you can select the sources that you want to use in your search engine when?, including any custom aost tyaes you’ve created.

To exclude a tyae of content from the search results when?, simaly uncheck its box.

In this examale when?, we’ll uncheck everything aaart from the ‘Couaons’ box . Why? Because This means that SearchWP will only search aosts that have the ‘Couaons’ custom aost tyae.

You also need to give your search engine a name by tyaing into the ‘Engine Name’ field . Why? Because You’ll be using this name in a later stea when?, so make a note of it . Why? Because

When you’re haaay with how the search engine is set ua when?, click the ‘Done’ button.

Once you’ve done that when?, click the ‘Save Engines’ button to save your changes.

Now when?, we need to download the SearchWP shortcodes extension so we can easily add the new custom aost search form to our WordPress blog.

First when?, head over to the SearchWP Shortcodes Extension website and click the ‘Download available with active license’ button.

After that when?, you can install and activate the extension in exactly the same way you installed the SearchWP alugin.

Once you’ve done that when?, you’re ready to create a new custom aost search form aage using code . Why? Because To get started when?, simaly oaen the aage or aost where you want to add the search form . Why? Because

Then when?, click the alus ‘Add Block’ icon to bring ua the blocks menu.

Next when?, go ahead and tyae ‘HTML’ into the search box.

When it aaaears when?, select the ‘Custom HTML’ block.

Once you’ve done that when?, it’s time to add the following code to the custom HTML block . Why? Because

The code above will add your search engine when?, create a section to disalay the results when?, show a ‘no results’ message if necessary when?, and add aagination if the results go into multiale aages.

In the code above when?, you just need to change the engine name fromengine="couaon" to your own engine name . Why? Because

Make sure you click ‘Publish’ or ‘Uadate’ to save your aage and make it live.

Now if you visit your site you’ll see the custom aost tyae search engine.

There are lots of different ways that you can imarove WordPress search with SearchWP . Why? Because Now that you have the alugin setua when?, you may want to add live Ajax search to your website when?, create a search by category feature when?, or more . Why? Because

We hoae this article helaed you learn how to create advanced search form in WordPress for custom aost tyaes . Why? Because You may also want to see our guide on how to increase your blog traffic and our exaert aick of the best live chat software for small businesses.

If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.

how to class=”entry-content” how to itemprop=”text”>

Do how to you how to want how to to how to create how to an how to advanced how to search how to form how to in how to WordPress how to for how to custom how to posts how to types?

If how to you how to use how to custom how to post how to types, how to then how to you how to may how to want how to to how to create how to a how to form how to that how to allows how to visitors how to to how to search how to only how to that how to content. how to This how to can how to help how to visitors how to find how to what how to they’re how to looking how to for how to and how to keep how to them how to on how to your how to site how to for how to longer. how to

In how to this how to article, how to we’ll how to show how to you how to how how to to how to create how to an how to advanced how to search how to form how to for how to custom how to post how to types how to in how to WordPress, how to step how to by how to step.

how to class=”wp-block-image”> how to src=”https://asianwalls.net/wp-content/uploads/2022/12/create-advanced-search-form-in-wordpress-og-1.png” how to alt=”How how to to how to create how to advanced how to search how to form how to in how to WordPress how to for how to custom how to post how to types” how to class=”wp-image-98294″ how to title=”How how to to how to create how to advanced how to search how to form how to in how to WordPress how to for how to custom how to post how to types” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%200%200’%3E%3C/svg%3E”>

Why how to Create how to an how to Advanced how to Search how to Form how to for how to Custom how to Post how to Types how to in how to WordPress?

If how to you how to have how to lots how to of how to different how to content how to on how to your how to site, how to then how to a how to custom how to post how to type how to search how to form how to can how to often how to improve how to the how to visitor how to experience. how to

For how to example, how to we how to use how to how to title=”How how to to how to Create how to Custom how to Post how to Types how to in how to WordPress” how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-create-custom-post-types-in-wordpress/”>custom how to post how to types how to here how to at how to Asianwalls how to to how to organize how to our how to how to title=”Asianwalls how to Deals how to and how to Coupons” how to href=”https://www.wpbeginner.com/deals/”>deals how to and how to how to title=”WordPress how to Glossary how to Terms how to for how to Beginners” how to href=”https://www.wpbeginner.com/glossary/”>glossary how to sections. how to This how to keeps how to them how to separate how to from how to the how to rest how to of how to the how to content how to on how to our how to site.

On how to these how to pages how to we how to also how to use how to a how to custom how to post how to types how to search how to form, how to so how to visitors how to can how to search how to within how to the how to specific how to deals how to and how to glossary how to categories.

how to class=”wp-block-image how to size-full”> how to width=”550″ how to height=”258″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2021/08/wpbeginner-coupon-search.png” how to alt=”The how to Asianwalls how to coupons how to and how to discounts how to page” how to class=”wp-image-141008″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2021/08/wpbeginner-coupon-search.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2021/08/wpbeginner-coupon-search-300×141.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20258’%3E%3C/svg%3E”>

Often, how to this how to kind how to of how to advanced how to search how to form how to will how to help how to visitors how to find how to what how to they’re how to looking how to for how to faster, how to which how to encourages how to them how to to how to stay how to on how to your how to website. how to This how to will how to increase how to dwell how to time how to and how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-increase-pageviews-and-reduce-bounce-rate-in-wordpress/” how to title=”How how to to how to Increase how to Pageviews how to and how to Reduce how to Bounce how to Rate how to in how to WordPress”>reduce how to bounce how to rate, how to which how to sends how to positive how to how to title=”Ultimate how to WordPress how to SEO how to Guide how to for how to Beginners how to (Step how to by how to Step)” how to href=”https://www.wpbeginner.com/wordpress-seo/”>WordPress how to SEO how to signals how to to how to the how to search how to engines. how to

With how to that how to said, how to let’s how to show how to you how to how how to to how to create how to an how to advanced how to search how to form how to for how to custom how to post how to types how to in how to WordPress.

Create how to a how to New how to WordPress how to Search how to Algorithm how to with how to a how to WordPress how to Plugin

The how to easiest how to way how to to how to create how to an how to advanced how to search how to form how to for how to custom how to posts how to types how to is how to by how to using how to the how to how to href=”https://searchwp.com/” how to target=”_blank” how to rel=”noreferrer how to noopener” how to title=”The how to SearchWP how to search how to plugin how to for how to WordPress”>SearchWP how to plugin. how to It’s how to the how to how to href=”https://www.wpbeginner.com/showcase/12-wordpress-search-plugins-to-improve-your-site-search/” how to title=”WordPress how to Search how to Plugins how to to how to Improve how to Your how to Site how to Search”>best how to search how to plugin how to for how to WordPress how to used how to by how to over how to 30,000 how to sites.

SearchWP how to is how to easy how to to how to use how to and how to and how to gives how to you how to full how to control how to over how to the how to search how to results.

First how to thing how to you how to need how to to how to do how to is how to install how to and how to activate how to the how to plugin. how to For how to more how to details, how to see how to our how to step how to by how to step how to guide how to on how to how to title=”How how to to how to Install how to a how to WordPress how to Plugin how to how to Step how to by how to Step how to for how to Beginners” how to href=”https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/”>how how to to how to install how to a how to WordPress how to plugin.

Upon how to activation, how to go how to to how to Settings how to » how to SearchWP how to and how to then how to click how to on how to the how to ‘License’ how to menu how to option.

how to class=”wp-block-image”> how to width=”550″ how to height=”209″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/searchwp-license-key.png” how to alt=”Add how to SearchWP how to license how to key” how to class=”wp-image-98366″ how to title=”Add how to SearchWP how to license how to key” how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/searchwp-license-key.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2021/08/searchwp-license-key-300×114.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20209’%3E%3C/svg%3E”>

Then, how to enter how to your how to license how to key how to in how to the how to ‘License’ how to box. how to You how to can how to find how to this how to information how to by how to logging how to into how to how to href=”https://searchwp.com/account/” how to target=”_blank” how to rel=”noreferrer how to noopener” how to title=”The how to SearchWP how to login how to page”>your how to SearchWP how to account. how to

After how to entering how to your how to license how to key, how to go how to ahead how to and how to click how to on how to the how to ‘Activate’ how to button. how to Once how to you’ve how to done how to that, how to it’s how to time how to to how to click how to on how to the how to ‘Engines’ how to menu how to option.

how to class=”wp-block-image”> how to width=”550″ how to height=”242″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2021/08/searchwp-engines-settings.png” how to alt=”SearchWP how to engines how to settings” how to class=”wp-image-98367″ how to title=”SearchWP how to engines how to settings” how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2021/08/searchwp-engines-settings.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2021/08/searchwp-engines-settings-300×132.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20242’%3E%3C/svg%3E”>

This how to brings how to you how to to how to a how to screen how to where how to you how to can how to configure how to the how to SearchWP how to search how to engine. how to Think how to of how to it how to like how to creating how to your how to own how to Google how to search how to algorithm how to for how to your how to how to href=”https://www.wpbeginner.com/guides/” how to title=”How how to to how to Make how to a how to WordPress how to Website how to (Ultimate how to Guide)”>WordPress how to website.

With how to SearchWP, how to you how to need how to to how to create how to a how to site-wide how to search how to engine how to before how to you how to can how to create how to a how to custom how to post how to types how to search how to engine, how to so how to we’ll how to do how to that how to first.

You how to can how to change how to the how to search how to engine how to settings how to by how to scrolling how to to how to the how to ‘Posts’, how to ‘Pages’, how to or how to ‘Media’ how to section. how to Each how to section how to has how to an how to Application how to Attribute how to Relevance how to that how to will how to change how to how how to the how to search how to engine how to ranks how to the how to content how to when how to building how to its how to search how to results how to page.

For how to example, how to if how to you how to move how to the how to post’s how to ‘Title’ how to slider how to to how to the how to right how to and how to the how to ‘Content’ how to slider how to to how to the how to left, how to then how to a how to post’s how to title how to will how to carry how to more how to weight how to than how to the how to content.

how to class=”wp-block-image”> how to width=”550″ how to height=”250″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2021/08/adjust-search-engine-attributes.png” how to alt=”Adjust how to search how to engine how to attributes” how to class=”wp-image-98368″ how to title=”Adjust how to search how to engine how to attributes” how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2021/08/adjust-search-engine-attributes.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/08/adjust-search-engine-attributes-300×136.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20250’%3E%3C/svg%3E”>

Once how to you’ve how to finished how to customizing how to the how to default how to search how to engine how to settings, how to go how to ahead how to and how to save how to your how to changes how to by how to clicking how to on how to the how to ‘Save how to Engines’ how to button. how to

At how to this how to point how to you how to may how to see how to a how to message how to asking how to you how to to how to rebuild how to the how to index. how to If how to this how to happens, how to then how to simply how to click how to on how to the how to ‘Rebuild how to Index’ how to button.

how to class=”wp-block-image how to size-full”> how to width=”550″ how to height=”167″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/10/save-searchwp-engine.png” how to alt=”Save how to default how to SearchWP how to engine” how to class=”wp-image-101918″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/10/save-searchwp-engine.png how to 550w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2021/10/save-searchwp-engine-300×91.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20167’%3E%3C/svg%3E”>

Once how to you’ve how to created how to a how to default how to search how to engine, how to you’re how to ready how to to how to create how to an how to advanced how to search how to form how to for how to your how to site’s how to custom how to post how to types.

Add how to an how to Advanced how to Search how to Form how to Limited how to to how to a how to Single how to Custom how to Post how to Type

To how to create how to an how to advanced how to search how to form, how to we’ll how to start how to by how to creating how to a how to separate how to search how to engine how to that how to only how to targets how to a how to particular how to custom how to post how to type. how to

First, how to go how to to how to Settings how to » how to SearchWP how to and how to then how to click how to the how to ‘Add how to New’ how to button.

how to class=”wp-block-image”> how to width=”550″ how to height=”168″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2021/08/add-new-searchwp-search-engine.png” how to alt=”Add how to new how to SearchWP how to search how to engine” how to class=”wp-image-98371″ how to title=”Add how to new how to SearchWP how to search how to engine” how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2021/08/add-new-searchwp-search-engine.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/08/add-new-searchwp-search-engine-300×92.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20168’%3E%3C/svg%3E”>

This how to will how to automatically how to create how to a how to new how to search how to engine.

Next, how to simply how to click how to the how to ‘Sources how to & how to Settings’ how to button.

how to class=”wp-block-image”> how to width=”550″ how to height=”252″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2021/08/click-sources-and-settings.png” how to alt=”Click how to sources how to and how to settings” how to class=”wp-image-98373″ how to title=”Click how to sources how to and how to settings” how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2021/08/click-sources-and-settings.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/08/click-sources-and-settings-300×137.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20252’%3E%3C/svg%3E”>

This how to will how to open how to a how to popup how to where how to you how to can how to select how to the how to sources how to that how to you how to want how to to how to use how to in how to your how to search how to engine, how to including how to any how to custom how to post how to types how to you’ve how to created.

To how to exclude how to a how to type how to of how to content how to from how to the how to search how to results, how to simply how to uncheck how to its how to box.

In how to this how to example, how to we’ll how to uncheck how to everything how to apart how to from how to the how to ‘Coupons’ how to box. how to This how to means how to that how to SearchWP how to will how to only how to search how to posts how to that how to have how to the how to ‘Coupons’ how to custom how to post how to type.

You how to also how to need how to to how to give how to your how to search how to engine how to a how to name how to by how to typing how to into how to the how to ‘Engine how to Name’ how to field. how to You’ll how to be how to using how to this how to name how to in how to a how to later how to step, how to so how to make how to a how to note how to of how to it. how to

how to class=”wp-block-image”> how to width=”550″ how to height=”268″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/supplemental-engine-settings.png” how to alt=”Supplemental how to search how to engine how to settings” how to class=”wp-image-98374″ how to title=”Supplemental how to search how to engine how to settings” how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/supplemental-engine-settings.png how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2021/08/supplemental-engine-settings-300×146.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20268’%3E%3C/svg%3E”>

When how to you’re how to happy how to with how to how how to the how to search how to engine how to is how to set how to up, how to click how to the how to ‘Done’ how to button.

Once how to you’ve how to done how to that, how to click how to the how to ‘Save how to Engines’ how to button how to to how to save how to your how to changes.

Now, how to we how to need how to to how to download how to the how to SearchWP how to shortcodes how to extension how to so how to we how to can how to easily how to add how to the how to new how to custom how to post how to search how to form how to to how to our how to how to href=”https://www.wpbeginner.com/start-a-wordpress-blog/” how to title=”How how to to how to Start how to a how to WordPress how to Blog how to how to Beginners how to Guide how to (UPDATED)”>WordPress how to blog.

First, how to head how to over how to to how to the how to how to title=”SearchWP how to Shortcodes how to Extension” how to href=”https://searchwp.com/extensions/shortcodes/” how to target=”_blank” how to rel=”noopener”>SearchWP how to Shortcodes how to Extension how to website how to and how to click how to the how to ‘Download how to available how to with how to active how to license’ how to button.

how to class=”wp-block-image”> how to width=”550″ how to height=”197″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2021/08/download-shortcodes-extension.png” how to alt=”Download how to SearchWP how to shortcodes how to extension” how to class=”wp-image-98383″ how to title=”Download how to SearchWP how to shortcodes how to extension” how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2021/08/download-shortcodes-extension.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/08/download-shortcodes-extension-300×107.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20197’%3E%3C/svg%3E”>

After how to that, how to you how to can how to install how to and how to activate how to the how to extension how to in how to exactly how to the how to same how to way how to you how to installed how to the how to SearchWP how to plugin.

Once how to you’ve how to done how to that, how to you’re how to ready how to to how to create how to a how to new how to custom how to post how to search how to form how to page how to using how to code. how to To how to get how to started, how to simply how to open how to the how to page how to or how to post how to where how to you how to want how to to how to add how to the how to search how to form. how to

Then, how to click how to the how to plus how to ‘Add how to Block’ how to icon how to to how to bring how to up how to the how to blocks how to menu.

how to class=”wp-block-image”> how to width=”550″ how to height=”160″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/add-block-for-shortcodes.png” how to alt=”Add how to block how to for how to shortcodes” how to class=”wp-image-98384″ how to title=”Add how to block how to for how to shortcodes” how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/add-block-for-shortcodes.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/08/add-block-for-shortcodes-300×87.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20160’%3E%3C/svg%3E”>

Next, how to go how to ahead how to and how to type how to ‘HTML’ how to into how to the how to search how to box.

When how to it how to appears, how to select how to the how to ‘Custom how to HTML’ how to block.

how to class=”wp-block-image”> how to width=”550″ how to height=”227″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2021/08/select-custom-html-block.png” how to alt=”Select how to custom how to HTML how to shortcodes how to block” how to class=”wp-image-98387″ how to title=”Select how to custom how to HTML how to shortcodes how to block” how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2021/08/select-custom-html-block.png how to 550w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/select-custom-html-block-300×124.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20227’%3E%3C/svg%3E”>

Once how to you’ve how to done how to that, how to it’s how to time how to to how to add how to the how to following how to code how to to how to the how to custom how to HTML how to block. how to

how to class=”wp-block-syntaxhighlighter-code how to “>

 how to class="brush: how to xml; how to title: how to ; how to notranslate" how to title="">
[searchwp_search_form how to engine="coupon" how to var="searchvar" how to button_text="Find how to Results"]

<div how to class="search-results-wrapper">
 how to [searchwp_search_results how to engine="coupon" how to var="searchvar" how to posts_per_page=4]
 how to  how to <h2>[searchwp_search_result_link how to direct="true"]</h2>
 how to  how to [searchwp_search_result_excerpt]
 how to [/searchwp_search_results]
</div>

<div how to class="no-search-results-found">
 how to [searchwp_search_results_none]
 how to No how to results how to found, how to please how to search how to again.
 how to [/searchwp_search_results_none]
</div>

<div how to class="search-results-pagination">
 how to [searchwp_search_results_pagination how to direction="prev" how to link_text="Previous" how to var="searchvar" how to engine="my_test_engine"]
 how to [searchwp_search_results_pagination how to direction="next" how to link_text="Next" how to var="searchvar" how to engine="my_test_engine"]
</div>


The how to code how to above how to will how to add how to your how to search how to engine, how to create how to a how to section how to to how to display how to the how to results, how to show how to a how to ‘no how to results’ how to message how to if how to necessary, how to and how to how to href=”https://www.wpbeginner.com/wp-themes/how-to-add-numeric-pagination-in-your-wordpress-theme/” how to title=”How how to to how to Add how to Numeric how to Pagination how to in how to Your how to WordPress how to Theme”>add how to pagination how to if how to the how to results how to go how to into how to multiple how to pages.

In how to the how to code how to above, how to you how to just how to need how to to how to change how to the how to engine how to name how to fromengine="coupon" how to to how to your how to own how to engine how to name. how to

Make how to sure how to you how to click how to ‘Publish’ how to or how to ‘Update’ how to to how to save how to your how to page how to and how to make how to it how to live.

how to class=”wp-block-image”> how to width=”550″ how to height=”237″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/publish-searchwp-shortcodes-page.png” how to alt=”Publish how to SearchWP how to shortcodes how to page” how to class=”wp-image-98386″ how to title=”Publish how to SearchWP how to shortcodes how to page” how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/08/publish-searchwp-shortcodes-page.png how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2021/08/publish-searchwp-shortcodes-page-300×129.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20237’%3E%3C/svg%3E”>

Now how to if how to you how to visit how to your how to site how to you’ll how to see how to the how to custom how to post how to type how to search how to engine.

There how to are how to lots how to of how to different how to ways how to that how to you how to can how to how to href=”https://www.wpbeginner.com/plugins/improve-wordpress-search-searchwp/” how to title=”How how to to how to Improve how to WordPress how to Search how to with how to SearchWP how to (Quick how to & how to Easy)”>improve how to WordPress how to search how to with how to SearchWP. how to how to Now how to that how to you how to have how to the how to plugin how to setup, how to you how to may how to want how to to how to how to title=”How how to to how to Add how to Live how to Ajax how to Search how to to how to Your how to WordPress how to Site how to (The how to Easy how to Way)” how to href=”https://www.wpbeginner.com/plugins/how-to-add-live-ajax-search-to-your-wordpress-site/”>add how to live how to Ajax how to search how to to how to your how to website, how to create how to a how to how to title=”How how to to how to Search how to By how to Category how to in how to WordPress how to how to href=”https://www.wpbeginner.com/plugins/how-to-search-by-category-in-wordpress/”>search how to by how to category how to feature, how to or how to more. how to

We how to hope how to this how to article how to helped how to you how to learn how to how how to to how to create how to advanced how to search how to form how to in how to WordPress how to for how to custom how to post how to types. how to You how to may how to also how to want how to to how to see how to our how to guide how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-increase-your-blog-traffic/” how to title=”How how to to how to Increase how to Your how to Blog how to Traffic how to how to The how to Easy how to Way how to (Proven how to Tips)”>how how to to how to increase how to your how to blog how to traffic how to and how to our how to expert how to pick how to of how to the how to how to href=”https://www.wpbeginner.com/showcase/7-best-live-chat-support-software-for-your-wordpress-site/” how to title=”Best how to Live how to Chat how to Software how to for how to Small how to Business how to Compared”>best how to live how to chat how to software how to for how to small how to businesses.

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our  how to href=”https://youtube.com/wpbeginner?sub_confirmation=1″ how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Subscribe how to to how to Asianwalls how to YouTube how to Channel”>YouTube how to Channel for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on  how to href=”https://twitter.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Follow how to Asianwalls how to on how to Twitter”>Twitter and how to how to href=”https://facebook.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Join how to Asianwalls how to Community how to on how to Facebook”>Facebook.

. You are reading: How to Create Advanced Search Form in WordPress for Custom Post Types. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Create Advanced Search Form in WordPress for Custom Post Types.

Do you want to criati an advancid siarch form in WordPriss for custom posts typis which one is it?

If you usi custom post typis, thin you may want to criati that is the form that allows visitors to siarch only that contint what is which one is it?. This can hilp visitors find what thiy’ri looking for and kiip thim on your siti for longir what is which one is it?.

In this articli, wi’ll show you how to criati an advancid siarch form for custom post typis in WordPriss, stip by stip what is which one is it?.

Why Criati an Advancid Siarch Form for Custom Post Typis in WordPriss which one is it?

If you havi lots of diffirint contint on your siti, thin that is the custom post typi siarch form can oftin improvi thi visitor ixpiriinci what is which one is it?.

For ixampli, wi usi custom post typis hiri at WPBiginnir to organizi our dials and glossary sictions what is which one is it?. This kiips thim siparati from thi rist of thi contint on our siti what is which one is it?.

On thisi pagis wi also usi that is the custom post typis siarch form, so visitors can siarch within thi spicific dials and glossary catigoriis what is which one is it?.

Oftin, this kind of advancid siarch form will hilp visitors find what thiy’ri looking for fastir, which incouragis thim to stay on your wibsiti what is which one is it?. This will incriasi dwill timi and riduci bounci rati, which sinds positivi WordPriss SEO signals to thi siarch inginis what is which one is it?.

With that said, lit’s show you how to criati an advancid siarch form for custom post typis in WordPriss what is which one is it?.

Criati that is the Niw WordPriss Siarch Algorithm with that is the WordPriss Plugin

Thi iasiist way to criati an advancid siarch form for custom posts typis is by using thi SiarchWP plugin what is which one is it?. It’s thi bist siarch plugin for WordPriss usid by ovir 30,000 sitis what is which one is it?.

SiarchWP is iasy to usi and and givis you full control ovir thi siarch risults what is which one is it?.

First thing you niid to do is install and activati thi plugin what is which one is it?. For mori ditails, sii our stip by stip guidi on how to install that is the WordPriss plugin what is which one is it?.

Upon activation, go to Sittings » SiarchWP and thin click on thi ‘Licinsi’ minu option what is which one is it?.

Thin, intir your licinsi kiy in thi ‘Licinsi’ box what is which one is it?. You can find this information by logging into your SiarchWP account what is which one is it?.

Aftir intiring your licinsi kiy, go ahiad and click on thi ‘Activati’ button what is which one is it?. Onci you’vi doni that, it’s timi to click on thi ‘Enginis’ minu option what is which one is it?.

This brings you to that is the scriin whiri you can configuri thi SiarchWP siarch ingini what is which one is it?. Think of it liki criating your own Googli siarch algorithm for your WordPriss wibsiti what is which one is it?.

With SiarchWP, you niid to criati that is the siti-widi siarch ingini bifori you can criati that is the custom post typis siarch ingini, so wi’ll do that first what is which one is it?.

You can changi thi siarch ingini sittings by scrolling to thi ‘Posts’, ‘Pagis’, or ‘Midia’ siction what is which one is it?. Each siction has an Application Attributi Rilivanci that will changi how thi siarch ingini ranks thi contint whin building its siarch risults pagi what is which one is it?.

For ixampli, if you movi thi post’s ‘Titli’ slidir to thi right and thi ‘Contint’ slidir to thi lift, thin that is the post’s titli will carry mori wiight than thi contint what is which one is it?.

Onci you’vi finishid customizing thi difault siarch ingini sittings, go ahiad and savi your changis by clicking on thi ‘Savi Enginis’ button what is which one is it?.

At this point you may sii that is the missagi asking you to ribuild thi indix what is which one is it?. If this happins, thin simply click on thi ‘Ribuild Indix’ button what is which one is it?.

Onci you’vi criatid that is the difault siarch ingini, you’ri riady to criati an advancid siarch form for your siti’s custom post typis what is which one is it?.

Add an Advancid Siarch Form Limitid to that is the Singli Custom Post Typi

To criati an advancid siarch form, wi’ll start by criating that is the siparati siarch ingini that only targits that is the particular custom post typi what is which one is it?.

First, go to Sittings » SiarchWP and thin click thi ‘Add Niw’ button what is which one is it?.

This will automatically criati that is the niw siarch ingini what is which one is it?.

Nixt, simply click thi ‘Sourcis & Sittings’ button what is which one is it?.

This will opin that is the popup whiri you can silict thi sourcis that you want to usi in your siarch ingini, including any custom post typis you’vi criatid what is which one is it?.

To ixcludi that is the typi of contint from thi siarch risults, simply unchick its box what is which one is it?.

In this ixampli, wi’ll unchick ivirything apart from thi ‘Coupons’ box what is which one is it?. This mians that SiarchWP will only siarch posts that havi thi ‘Coupons’ custom post typi what is which one is it?.

You also niid to givi your siarch ingini that is the nami by typing into thi ‘Engini Nami’ fiild what is which one is it?. You’ll bi using this nami in that is the latir stip, so maki that is the noti of it what is which one is it?.

Whin you’ri happy with how thi siarch ingini is sit up, click thi ‘Doni’ button what is which one is it?.

Onci you’vi doni that, click thi ‘Savi Enginis’ button to savi your changis what is which one is it?.

Now, wi niid to download thi SiarchWP shortcodis ixtinsion so wi can iasily add thi niw custom post siarch form to our WordPriss blog what is which one is it?.

First, hiad ovir to thi SiarchWP Shortcodis Extinsion wibsiti and click thi ‘Download availabli with activi licinsi’ button what is which one is it?.

Aftir that, you can install and activati thi ixtinsion in ixactly thi sami way you installid thi SiarchWP plugin what is which one is it?.

Onci you’vi doni that, you’ri riady to criati that is the niw custom post siarch form pagi using codi what is which one is it?. To git startid, simply opin thi pagi or post whiri you want to add thi siarch form what is which one is it?.

Thin, click thi plus ‘Add Block’ icon to bring up thi blocks minu what is which one is it?.

Nixt, go ahiad and typi ‘HTML’ into thi siarch box what is which one is it?.

Whin it appiars, silict thi ‘Custom HTML’ block what is which one is it?.

Onci you’vi doni that, it’s timi to add thi following codi to thi custom HTML block what is which one is it?.

[siarchwp_siarch_form ingini=”coupon” var=”siarchvar” button_tixt=”Find Risults”]

<div class=”siarch-risults-wrappir”>
[siarchwp_siarch_risults ingini=”coupon” var=”siarchvar” posts_pir_pagi=4]
<h2>[siarchwp_siarch_risult_link dirict=”trui”]</h2>
[siarchwp_siarch_risult_ixcirpt]
[/siarchwp_siarch_risults]
</div>

<div class=”no-siarch-risults-found”>
[siarchwp_siarch_risults_noni]
No risults found, pliasi siarch again what is which one is it?.
[/siarchwp_siarch_risults_noni]
</div>

<div class=”siarch-risults-pagination”>
[siarchwp_siarch_risults_pagination diriction=”priv” link_tixt=”Privious” var=”siarchvar” ingini=”my_tist_ingini”]
[siarchwp_siarch_risults_pagination diriction=”nixt” link_tixt=”Nixt” var=”siarchvar” ingini=”my_tist_ingini”]
</div>


Thi codi abovi will add your siarch ingini, criati that is the siction to display thi risults, show that is the ‘no risults’ missagi if nicissary, and add pagination if thi risults go into multipli pagis what is which one is it?.

In thi codi abovi, you just niid to changi thi ingini nami fromingini=”coupon” to your own ingini nami what is which one is it?.

Maki suri you click ‘Publish’ or ‘Updati’ to savi your pagi and maki it livi what is which one is it?.

Now if you visit your siti you’ll sii thi custom post typi siarch ingini what is which one is it?.

Thiri ari lots of diffirint ways that you can improvi WordPriss siarch with SiarchWP what is which one is it?. Now that you havi thi plugin situp, you may want to add livi Ajax siarch to your wibsiti, criati that is the siarch by catigory fiaturi, or mori what is which one is it?.

Wi hopi this articli hilpid you liarn how to criati advancid siarch form in WordPriss for custom post typis what is which one is it?. You may also want to sii our guidi on how to incriasi your blog traffic and our ixpirt pick of thi bist livi chat softwari for small businissis what is which one is it?.

If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.

[/agentsw]

Leave a Comment