Autocomplete sort on relevance
-
In the autocomplete settings I can change the order of the indexable post types. But I don’t want to order on post types.
Is there a possibility to order on relevance (Posts with the most number of keywords first.)
For example when I now search for “blue cars” I see these results:
Planes post types
Plane Light Jets blue
Plane Jumbo Jet blue
Plane Airbus A300-600F
Cars post types
Car BMW Blue
Car Ford Blue
Ford Fiesta
Every time I search something, I see planes first.
Because Blue and cars are more relevant for cars, these result would be better:
Cars post types
Car BMW Blue
Car Ford Blue
Ford Fiesta
Planes post types
Plane Light Jets blue
Plane Jumbo Jet blue
Plane Airbus A300-600F
Or without category subdivision:
Car BMW Blue
Car Ford Blue
Plane Light Jets blue
Plane Jumbo Jet blue
Ford Fiesta
Plane Airbus A300-600F
Is this possible? Can someone point me in the right direction? Are there any codes for this that I can simply add to functions.php?
- The topic ‘Autocomplete sort on relevance’ is closed to new replies.