Hi, I got a filtering of woocommerce products in a view. It all works but when there is only 1 item the column and filter is squeezed.
Can you help me?
Site: hidden link
-> problem when clicking on "Gifts"
Thanks!
Hi,
Thank you for contacting us and I'd be happy to assist.
From looking into the source code of the page, it seems some closing div tag is for the grid layout is not placed correctly in the view's "Loop Editor".
Here is an example of the correct structure of the grid layout, with 3 columns:
[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-md-4">
// Content
</div>
[wpv-item index=other]
<div class="col-md-4">
// Content
</div>
[wpv-item index=3]
<div class="col-md-4">
// Content
</div>
</div>
[wpv-item index=pad]
<div class="col-md-4"></div>
[wpv-item index=pad-last]
<div class="col-md-4"></div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
Note: You'll replace "// Content" with the actual content for the individual loop item.
In case the issue persists, please share the actual content that you have in the view's loop editor.
regards,
Waqar
Hi Waqar, thanks for the feedback.
Seems not to help if I replace the code with the basic structure. There is indeed a </div> too much but it has always been that way in Toolset views when generating a bootstrap loop. Even if I remove the div, it's still like that.
Here the code now (and also the in attatch some screenshots):
[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-md-4">
[wpv-post-body view_template="loop-item-in-productgrid"]
</div>
[wpv-item index=other]
<div class="col-md-4">
[wpv-post-body view_template="loop-item-in-productgrid"]
</div>
[wpv-item index=3]
<div class="col-md-4">
[wpv-post-body view_template="loop-item-in-productgrid"]
</div>
</div>
[wpv-item index=pad]
<div class="col-md-4"></div>
[wpv-item index=pad-last]
<div class="col-md-4"></div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]Geen producten gevonden[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
Thanks for writing back.
I've tested the exact code that you've shared and couldn't reproduce the same behavior on my test website.
Can you please share temporary admin login details, so that I can see how this view is set up in the admin area?
Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.
My issue is resolved now. Thank you!