Title: Specific string
Last modified: August 31, 2016

---

# Specific string

 *  [andrealves](https://wordpress.org/support/users/andrealves/)
 * (@andrealves)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/specific-string/)
 * Hi.
 * I’d like to know if there’s an option to only return products/posts with the 
   specific string entered, for instance “VITAMINA C”: [http://farmabiologica.pt/?s=vitamina+c&post_type=product](http://farmabiologica.pt/?s=vitamina+c&post_type=product)
 * I’d like to show just that specific product only (or make it the first result
   at least). Is this possible? Do I need to make any mod?
 * Regards,
    andre
 * [https://wordpress.org/plugins/better-search/](https://wordpress.org/plugins/better-search/)

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

 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/specific-string/#post-7250534)
 * It won’t work out of the box because the algorithm tries to find “related” results
   as well.
 * You will need a mod for this one which would need to effectively over ride the
   match functionality for the related search.
 * Can you also try this in your theme’s functions.php
 *     ```
       function bsearch_no_match( $match ) {
         return ' ';
       }
       add_filter( 'bsearch_posts_match', 'bsearch_no_match' );
       add_filter( 'bsearch_posts_match_field', 'bsearch_no_match' );
       ```
   
 *  Thread Starter [andrealves](https://wordpress.org/support/users/andrealves/)
 * (@andrealves)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/specific-string/#post-7250536)
 * Tried that code, it seems to return another stuff before: [http://i.imgur.com/1TWxhae.png](http://i.imgur.com/1TWxhae.png)
 * Like google, if we search the terms inside the quotation marks “VITAMINA C” it
   makes what I need.
    Not sure if it’s possible to include that marks in the query
   on submit?
 * Thanks for the help
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/specific-string/#post-7250540)
 * Just checked your site out looking at the phrases. Could you please try turning
   on Boolean Mode in the Settings.
 *  Thread Starter [andrealves](https://wordpress.org/support/users/andrealves/)
 * (@andrealves)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/specific-string/#post-7250541)
 * Turned on and using the function you provided above, it returns the same results.
   
   I left the Boolean Mode on.
 * Thanks
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/specific-string/#post-7250542)
 * You might want to remove the function above because that bypasses any of the 
   fulltext matching
 *  Thread Starter [andrealves](https://wordpress.org/support/users/andrealves/)
 * (@andrealves)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/specific-string/#post-7250543)
 * I’m not using it.

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

The topic ‘Specific string’ is closed to new replies.

 * ![](https://ps.w.org/better-search/assets/icon-256x256.png?rev=2988729)
 * [Better Search - Relevant search results for WordPress](https://wordpress.org/plugins/better-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-search/)
 * [Active Topics](https://wordpress.org/support/plugin/better-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-search/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [andrealves](https://wordpress.org/support/users/andrealves/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/specific-string/#post-7250543)
 * Status: not resolved