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?
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?
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/
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
The search, as it is, doesn’t seem to be Relevanssi. Have you switched to using Full Site Editing? If so, see this.
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
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
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.
Yup! Disabled FacetWP and the search is back to normal.
Thanks Mikko.
I will get another license bought!