Title: Multiple search forms
Last modified: August 8, 2020

---

# Multiple search forms

 *  Resolved [justmigrating](https://wordpress.org/support/users/justmigrating/)
 * (@justmigrating)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/multiple-search-forms-2/)
 * I have two search forms on my site: one that searches only a subset of pages 
   on the site and the other that searches blog posts. Each search form has a hidden
   field, search-type. Is there a way I can apply the WP Extended Search settings
   to only one of my search forms? I’d like to use the WP Extended Search for the
   search form that only searches a subset of pages. I have that working, but now
   I don’t have a way to search blog posts.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmultiple-search-forms-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Sumit Singh](https://wordpress.org/support/users/5um17/)
 * (@5um17)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/multiple-search-forms-2/#post-13239067)
 * Hi,
 * I am working on new version where you can have multiple forms with multiple settings.
   
   Meanwhile, you can replace `search-type` with `post_type` and the value of this
   field should be the post type name e.g.
 *     ```
       <input type="hidden" name="post_type" value="page" />
       ```
   
 * to search only pages.
 * WPES respect that “post_type” query strings and displays only posts from value
   of this field.
 * Thanks
 *  Thread Starter [justmigrating](https://wordpress.org/support/users/justmigrating/)
 * (@justmigrating)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/multiple-search-forms-2/#post-13239256)
 * Sumit- Thank you for replying, but I don’t think this helps. I have two search
   forms, each with a hidden field of search-type, and two search files (search-
   blog.php and search-members.php). Search-blog.php searches blog posts and search-
   member.php searches only member pages (this is a membership site). My theme’s
   search.php file has the following code so WordPress know which search file to
   load.
 * if(isset($_GET[‘search-type’])) {
    $type = $_GET[‘search-type’]; if($type == ‘
   blog’) { load_template(TEMPLATEPATH . ‘/search-blog.php’); } elseif($type == ‘
   members’) { load_template(TEMPLATEPATH . ‘/search-members.php’); } }
 * I like your plugin because for my member page search, I can specify the search
   only on title and meta keys, and not the content, which is something I can’t 
   figure out how to code on my own (my custom search includes the content of member
   pages, which I don’t want). But I can’t figure out how to use your plugin for
   my member page search, and also have a separate standard search for blog posts.
 *  Plugin Author [Sumit Singh](https://wordpress.org/support/users/5um17/)
 * (@5um17)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/multiple-search-forms-2/#post-13246163)
 * Okay, I got it now.
    Currently you can have only one setting for all searches.(
   This will be changed in future.)
 * I can suggest you keep using WPES for Member search and disable WPES for blog
   search.
 * To disable the WPES for blog page use the hook [`wpes_enabled`](https://wpes.secretsofgeeks.com/hooks#wpes_enabled)
 * Check for search-type like you are checking here and return false.
 *     ```
       $type = $_GET[‘search-type’];
       if($type == ‘blog’) {
           return false;
       }
       ```
   
 * Let me know if this helps.
 *  Thread Starter [justmigrating](https://wordpress.org/support/users/justmigrating/)
 * (@justmigrating)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/multiple-search-forms-2/#post-13247108)
 * Sumit-
 * I was unable to get that to work. However, I found this code on a “hooks” site,
   which I put in my functions.php file:
 * function wpes_enabled($enabled) {
    if (!empty($_GET[‘disable_wpes’])) { return
   FALSE; } return $enabled; } add_filter(‘wpes_enabled’, ‘wpes_enabled’);
 * And I added the following input to my blog searchform:
    <input type=”hidden” 
   name=”disable_wpes” value=”true” />
 * Now, my member search uses the WPES plugin and my blog search does not, which
   gives me what I want.
 *  Plugin Author [Sumit Singh](https://wordpress.org/support/users/5um17/)
 * (@5um17)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/multiple-search-forms-2/#post-13265065)
 * Good to know if you want to use WP Extended Search with blog search as well then
   please take a look at this topic [https://wordpress.org/support/topic/wp-extended-search-2-0-beta-1/](https://wordpress.org/support/topic/wp-extended-search-2-0-beta-1/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Multiple search forms’ is closed to new replies.

 * ![](https://ps.w.org/wp-extended-search/assets/icon-256x256.png?rev=2436853)
 * [WP Extended Search](https://wordpress.org/plugins/wp-extended-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-extended-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-extended-search/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-extended-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-extended-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-extended-search/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Sumit Singh](https://wordpress.org/support/users/5um17/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/multiple-search-forms-2/#post-13265065)
 * Status: resolved