Adding attributes to Wordpress InstantSearch


I have pushed a custom field to Algolia and can see the data in the dashboard. I have also amended the autocomplete search to feature this snippet within search results, but I can’t work out how to do the same in InstantSearch results.

In my autocomplete file I added the following to allow me to use the data in my template:

attributesToSnippet: [ 'searchDescription' ]

Is there something similar required for InstantSearch to get the data available to use within my template?

1 Like

Hi @jack,

You will need to update your templates to show that new field.

Documentation about customizing the search page is available here:

You can copy paste the following logic:

Let me know if that helps,

I have added this code but the information still isn’t appearing. Is there anything I need to add similar to the attributesToSnippet array to make the data available in my template? Do I need to add this attribute somewhere in the dashboard first or will Algolia pull all data out automatically?