Please could you give me some guidance on achieving this.
Thanks as always
Marcus
I added a custom taxonomy. And now I want to add it to instantsearch module – https://cln.sh/f59PNnjl
How to do that?
]]>here is the part of my code with the for loop.
<# if ( data.col_1 ) { #>
<ul class="swatches">
<li class="two-color active">
<a class="tool" href="{{ data.permalink }}">
<span style="background-color: {{ data.col_1 }}"></span>
<span style="background-color: {{ data.col_2 }}"></span>
</a>
</li>
<# if ( data.swatches ) { #>
{% set swatches = data.swatches %}
{% for swatch in swatches %}
<li class="two-color">
test
</li>
{% endfor %}
<# } #>
</ul>
<# } #>
Here is front end output: https://gyazo.com/749de3c59ca1150acd3fffd8f86f2483
AS you can see its getting to the loop and then just printing out… I tried it with and without setting a data.swatches as a variable.
As a reference, this is the swatches array on Algolia. https://gyazo.com/ffdc8dcb825f16dc016ab604bebcfc00
Any support appreciated.
]]>I have searched through documentation and can’t find an obvious answer so wondered if you could help. I am trying to use a filter to update the Facet Display configuration as per (https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/?client=php).
This is so I can apply a custom item order to one of my facets.
Any help appreciated.
Thanks as always.
]]>I want to configure attributes for facets via a filter rather than the Algolia dashboard. I am using:
function custom_posts_index_settings( array $settings ) {
$settings['attributesForFaceting'][] = 'resource_type, solution_category, wpml.display_name';
return $settings;
}
add_filter( 'algolia_posts_index_settings', 'custom_posts_index_settings' );
When I push settings from the plugin it gives me a success message “Settings correctly pushed for index: searchable_posts” but doesn’t seem to work, and nothing is reflected on the dashboard or the search page. Any clues you could give me?
Thanks as always.
]]>Is it possible to create 2 indexes?
I have created an index that uses filters to included only a custom post type, along with some additional attributes for facets derived from a custom taxonomy. I have then created a page (not the search page) for visitors to find particular information, all of which is working fine.
But obviously this impacts the site search which will now only return the results from my index that contains custom posts as I have had to leave either the “Use Algolia in the backend” or “Use Algolia with Instantsearch.js” active.
So is it possible to:
1. Create another index that contains all searchable posts that I can use on the site search results page?
2. Disable Algolia for site results page, without activating “Do not use Algolia”?
Thanks as always.
]]>I have indexed a custom taxonomy:
"taxonomies_hierarchical": {
"global_tag": {
"lvl0": [
"Years and Months",
"Employees",
"Press and Media",
"Resource Types",
"Solutions",
"Expertise",
"Solutions by Name"
],
"lvl1": [
"Years and Months > 2022",
"Employees > Harry Bunce",
"Press and Media > Execution",
"Resource Types > News",
"Solutions > Reference",
"Expertise > Regulataions",
"Solutions by Name > Acme AI"
],
"lvl2": [
"Years and Months > 2022 > 07 - July 2022"
]
}
},
Is it possible to use a filter (in a similar way to indexing custom fields) to index parts of this taxonomy separately?
For example, create a new object array with only child terms of ‘Resource Types. As I have over 100 terms I would like to split the taxonomy across multiple facets.
Thank you, any help appreciated.
]]>I use woocommerce and on instant result page I am getting images in thumbnail size and I need show full image size.
I tried these codes in functions.php and re-indexed, but it does not work
add_filter('algolia_post_images_sizes', function($sizes) {
$sizes[] = 'medium';
return $sizes;
});
and
add_filter('algolia_post_images_sizes', function($sizes) {
$sizes[] = 'shop_catalog';
return $sizes;
});
Can you point me how to set it?
Thanks
]]>our SEO guy noticed, that the posts (in our case WooCommerce products) aren’t visible in the Google Mobile-Friendly Test.
That’s very hurtful for our SEO.
He told me that the products are loaded with a POST request. And Google don’t execute POST requests. Is that true?
Is there anything I can do about it?
]]>