我正在尝试在 Bootstrap 4 中创建一个推荐滑块,它将在 WordPress 中使用自定义帖子类型,但我正在努力让滑块正常工作。
所以我对你的问题是,我如何才能在轮播中显示文本?当我注释掉图像时,它不起作用并且已经在网上搜索了如何做到这一点,但是 BS4 的采用率并不高,这令人沮丧!
<div class="testimonial-Slider">
<div class="container">
<div class="row">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img class="d-block img-fluid" src="http://lorempixel.com/960/300/" alt="First slide">
<div class="carousel-caption">
<h3>Test Headings</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu</p>
</div>
</div>
<div class="carousel-item">
<img class="d-block img-fluid" src="http://lorempixel.com/960/300/" alt="Second slide">
<div class="carousel-caption">
<h3>Test Headings</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu</p>
</div>
</div>
<div class="carousel-item">
<img class="d-block img-fluid" src="http://lorempixel.com/960/300/" alt="Third slide">
<div class="carousel-caption">
<h3>Test Headings</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu</p>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
我非常有信心我可以让自定义帖子类型和 WP Query 正常工作,但这是我遇到的问题!
干杯伙计们:)