我不能在我的wordpress插件中使用no-autocomplete類algolia,如何在algolia wordpress插件中實現no-autocomplete類?
我在做什麼錯?
<script type="text/html" id="tmpl-autocomplete-post-suggestion">
<a class="suggestion-link" href="{{ data.permalink }}" title="{{ data.post_title }}">
<# if (data.images.thumbnail) { #>
<img class="suggestion-post-thumbnail" src="{{ data.images.thumbnail.url }}" alt="{{ data.post_title }}">
<# } #>
<div class="suggestion-post-attributes">
<span class="suggestion-post-title" >{{{ data._highlightResult.post_title.value }}}</span>
<!-- <# if (data._snippetResult['content']) { #>
<span class="suggestion-post-content">{{{ data._snippetResult['content'].value }}}</span>
<# } #> -->
</div>
<div class="suggestion-taxonimies-attributes">
<# if (data.taxonomies.product_visibility == "outofstock") { #>
<span class="suggestion-taxonomies-product-visibility ">Out of Stock</span>
<div class="suggestion-taxonimies-attributes">
<# if (data.taxonomies.product_visibility == "exclude-from-search") { #>
<span class="no-autocomplete"></span>
<# } #>
</a>
</script>
這是我正在尋找的具體代碼來實現。
<div class="suggestion-taxonimies-attributes">
<# if (data.taxonomies.product_visibility == "exclude-from-search") { #>
<span class="no-autocomplete"></span>
<# } #>
你能解釋一下,也許你想達到什麼樣的? 我想要不顯示一些結果,也許更好的解決方案是不索引這些結果。 無論如何,討論這些問題的更好的地方是這裏的論壇:https://discourse.algolia.com/ – rayrutjes