I am trying to: Use Bootstrap 4 "card" class in a Views Slider
Link to a page where the issue can be seen: I would like to keep private and not post publicly
I expected to see: My slider show with 5 items displayed in equal sized divs horizontally
Instead, I got: Strange output.
I have a slider set to show 5 items at a time of a custom post type.
I have this code in my Loop Output Editor:
[wpv-layout-start]
[wpv-items-found]
<div id="bulletins" class="nopadding">
<div class="card-group">
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-body view_template="Bulletins - slide"]
</wpv-loop>
<!-- wpv-loop-end -->
</div>
</div>
[/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]
And this in the template editor (the slide code):
<div class="card bg-transparent">
<div class="card-body">
<h5 class="card-title">[wpv-post-title]</h5>
<p class="card-text">[wpv-post-body view_template="None"]</p>
<a href="[wpv-post-url id="$page"]" class="card-link btn">Learn More</a>
</div>
</div>
But the items are not displaying horizontally in a row.
I went to Toolset settings to select Bootstrap 4, but I don;t see that as an option.
Thanks in advance for helping me figure this out. I would like to use the cards to create 5 equal width items using bootstrap, rather than custom percentage css widths.
Hi, once version 4 is stable and released, we plan to support the new version. For now, version 4 is still only a beta release, so our system is designed to work with Bootstrap 3. If you need to use Bootstrap 4, you can disable Toolset's Bootstrap version in Toolset > Settings > General > Bootstrap loading, and enqueue your own version independently in your theme or child theme. Then you can manually add the classes and markup needed to create Bootstrap 4 elements like cards.
Hi Christian,
thanks so much for your reply. Ok, understood!
Fortunately, somehow, it happens to be working as intended suddenly.
I'll check to make sure Bootstrap is disabled though, since I do load it in my theme.
Katrina