Title: Using shortcode but getting default WordPress search
Last modified: August 29, 2022

---

# Using shortcode but getting default WordPress search

 *  [418design](https://wordpress.org/support/users/webfactoryuk/)
 * (@webfactoryuk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/)
 * Hi,
 * I am using the [searchform] shortcode and it was working fine but we recently
   noticed only articles/posts are being returned in the front-end search.
 * Admin search still works OK.
 * Why would the shortcode stop working?
 * TIA
 * Sam

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

 *  Thread Starter [418design](https://wordpress.org/support/users/webfactoryuk/)
 * (@webfactoryuk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958387)
 * Ok, weirdly. I disabled Relevanssi and get all the results I was expecting from
   our custom post types etc which I think Relevanssi is responsible for?
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958422)
 * WordPress default search can also search custom post types. This sounds like 
   something is adding a post type restriction to the Relevanssi search. Does that
   sound possible?
 * You can try this:
 *     ```
       add_filter( 'relevanssi_modify_wp_query', function( $query ) {
         $query->set( 'post_type', 'any' );
         return $query;
       } );
       ```
   
 * This should make Relevanssi show all post types. Does this help?
 *  Thread Starter [418design](https://wordpress.org/support/users/webfactoryuk/)
 * (@webfactoryuk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958804)
 * You have helped out a lot with out site before. Its quite custom. I actually 
   thought we had premium support. I have emailed my client to purchase it again.
 * I have added your code but cant see any chance. Its the search at the top of 
   the site here
 * [https://wellbeingumbrella.co.uk/](https://wellbeingumbrella.co.uk/)
 * I dont remember the result URLs having these weird characters but I could be 
   wrong.
 * [https://wellbeingumbrella.co.uk/?s=reiki&x=21&y=15](https://wellbeingumbrella.co.uk/?s=reiki&x=21&y=15)
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958838)
 * The search, as it is, doesn’t seem to be Relevanssi. Have you switched to using
   Full Site Editing? If so, [see this](https://www.relevanssi.com/knowledge-base/gutenberg-full-site-editing/).
 *  Thread Starter [418design](https://wordpress.org/support/users/webfactoryuk/)
 * (@webfactoryuk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958848)
 * Sorry, forgot I had changed the shortcode. I have switched it back to [searchform]
   now and flushed the cache at Siteground.
 * Not using FSE. Havent been on the site in months. Just been asked to look into
   this.
 * Back to the normal URLs at least but still only showing articles.
 * [https://wellbeingumbrella.co.uk/?s=reiki](https://wellbeingumbrella.co.uk/?s=reiki)
 * I am pretty sure the Facet filter on the left still thinks they are all there
   otherwise it wouldnt be showring different ‘Listing Types’.
 * I just dont understand what has changed.
 * Sam
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958861)
 * The shortcode doesn’t really have anything to do with this. It just creates a
   search form and has nothing to do with what powers the search.
 * Ah, “Facet” is the significant keyword here. That explains why the Relevanssi`
   post_types` parameter has no effect and why the function I gave you has no effect.
 * Since Relevanssi is working correctly in the admin search, you may want to check
   this up with the FacetWP support. The problem may be there.
 *  Thread Starter [418design](https://wordpress.org/support/users/webfactoryuk/)
 * (@webfactoryuk)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958871)
 * Yup! Disabled FacetWP and the search is back to normal.
 * Thanks Mikko.
 * I will get another license bought!

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

The topic ‘Using shortcode but getting default WordPress search’ is closed to new
replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=2025044)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [418design](https://wordpress.org/support/users/webfactoryuk/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/using-shortcode-but-getting-default-wordpress-search/#post-15958871)
 * Status: not resolved