I was able to create a replica, customize the instantsearch template, add the sort widget but when changing the values it does not do anything
// SortBy widget for sorting
instantsearch.widgets.sortBy({
container: '#sortby',
items: [
{ label: 'Newest', value:
wp_searchable_posts_sort
},
{ label: 'Oldest', value: wp_searchable_post_sort_date
},
],
}),
<aside id="ais-facets">
<div>
<h3 class="widgettitle"><?php esc_html_e( 'Sort by', 'wp-search-with-algolia' ); ?></h3>
<section class="ais-facets" id="sortby"></section>
</div>
...
And in Algolia I have a main indices ‘wp_searchable_posts’ and have created a replica index called ‘wp_searchable_post_sort_date’
What else am I missing?