This is making me crazy. Today I added a new product category and added one product to the category. When I do my search the result shows the same product three times. How is this possible? It does not happen when I select any other taxonomy term in she search.
I click the new category checkbox and three duplicates are shown in the results.
I have a query filter
Select posts with taxonomy:
Product categories slug in all of those set by the URL parameter wpv-product_cat
This is the code from Search and pagination
[wpv-filter-start hide="false"]
<span style="margin-right: 20px; height:22px;">[wpv-filter-controls]<h3 style="display: inline-block;">SÖK SKIDA:</h3> <div style="margin:5px 0 15px 0;">[wpv-filter-search-box default_value="Sok efter produkt" class="search" style="background-color:#f4f4f4;"]</div></span> <span style="clear:both; margin-bottom: 10px; padding: 5px 0; display: inline-block;">[wpv-filter-submit name="Sök" output="bootstrap"] [wpv-filter-reset reset_label="Återställ" type="input" class="elementor-button.elementor-size-lg"]</span>
[wpv-control taxonomy="product_cat" url_param="wpv-product_cat" type="checkboxes" taxonomy_order="ASC" taxonomy_orderby="name" hide_empty="false"]
[/wpv-filter-controls]
[wpv-filter-end]
What is the link to your site?
hidden link
You can try with the last checkbox: "Turskida med stålkant".
Hi,
Thank you for contacting us and I'd be happy to assist.
On the page that you shared, I checked the option "Turskida med stålkant", but it showed 3 different results.
( screenshot: hidden link )
It seems that you may have sorted this out after writing to us, but please let me know if this still needs some investigation.
regards,
Waqar
The fix was to attach two more products to the category.
I suspect that the loop is to blame? If there is only one product as a result of the search will this code show three identical products?
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="3" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=other]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=3]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
</div>
[wpv-item index=pad]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=pad-last]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
Thanks for the update.
Yes, the content in your view's "Loop Editor" section needs some adjustment.
The content template for the loop shouldn't be called for the index=pad and index=pad-last entries:
Current:
[wpv-item index=pad]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
[wpv-item index=pad-last]
<div class="col-sm-4">[wpv-post-body view_template="slinga-objekt-i-skidor-search-2019"]</div>
Updated:
[wpv-item index=pad]
<div class="col-sm-4"></div>
[wpv-item index=pad-last]
<div class="col-sm-4"></div>
This should do the trick.
My issue is resolved now. Thank you!