Hi there,
Can anyone tell me what I need to change to the below code to the this grid to display as 3 columns rather than 2?
I have tried changing <wpv-loop wrap="2" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-6">
...various options however nothing i do works and I really don;t wish to try and recreate the gird.
This is the page: hidden link
This the code:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="2" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-6">[wpv-post-body view_template="loop-item-in-family-friendly"]</div>
[wpv-item index=other]
<div class="col-sm-6">[wpv-post-body view_template="loop-item-in-family-friendly"]</div>
[wpv-item index=2]
<div class="col-sm-6">[wpv-post-body view_template="loop-item-in-family-friendly"]</div>
</div>
[wpv-item index=pad]
<div class="col-sm-6"></div>
[wpv-item index=pad-last]
<div class="col-sm-6"></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]
Many thanks, P
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
Hi Pete
Use the Loop Wizard and specify 3 columns for the Bootstrap grid and it will generate the markup for you.
This is what it will output (the template name will be different):
[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-things"]</div>
[wpv-item index=other]
<div class="col-md-4">[wpv-post-body view_template="loop-item-in-things"]</div>
[wpv-item index=3]
<div class="col-md-4">[wpv-post-body view_template="loop-item-in-things"]</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]
You can edit the classnames to specify smaller sizes than medium screens, which is the default.
My issue is resolved now. Thank you!