ElasticPress icon indicating copy to clipboard operation
ElasticPress copied to clipboard

Feature: Autosuggest styles

Open tott opened this issue 3 years ago • 5 comments

With the ElasticPress autosuggest feature turned on, ElasticPress allows for search suggestion on most of the default WordPress search fields out of the box, however the look and feel of these results is only adjustable through filters and code alterations and cannot be easily altered through the interface.

Ideally we should be providing a UI that would allow for:

  • selection of displayed fields in autosuggest results
  • formatting of fields in autosuggest results
  • featured image thumbnails exposure toggling in autosuggest results

tott avatar Feb 16 '21 13:02 tott

Would you be able to point me in the direction of what filters I'll need to hook into to modify the look of the autosuggest results. I'm looking to do something similar and having trouble identifying what I need to do.

kyleruscigno avatar Mar 05 '21 03:03 kyleruscigno

Same here, looking to add thumbnails in autosuggest.

heresdaniel avatar May 26 '21 04:05 heresdaniel

Looks like the only way to currently do this is by directly modifying the autosuggest.js file, and adding in the meta fields you want to display.

Also, to get images to display in the auto suggest results, we would need to add the post's featured image url to a meta field, as currently only the image ID is saved to the post. This meta field can be created/updated using the save post hook.

Would be awesome if this was something natively integrated! Add to Milestone 3.6.0?

shmaltz avatar Jun 21 '21 21:06 shmaltz

Can we get featured images in autosuggest for 4.0?

shmaltz avatar Nov 08 '21 17:11 shmaltz

FWIW, this page of our docs outlines the process of changing that via code: https://10up.github.io/ElasticPress/tutorial-theme-integration.html

felipeelia avatar Nov 22 '22 14:11 felipeelia