如何解决如何在 wordpress 中动态 owl-carousel 多行?
我做了动态,但它显示在一个项目中。 我想垂直显示 2 个或更多项目。
我的 html 文件是这样的
<div id="post-slide" class="owl-carousel owl-theme post-slide">
<div class="item">
<div class="post-overaly-style text-center clearfix">
<div class="post-thumb">
<a href="#">
<img class="img-responsive" src="images/news/tech/gadget1.jpg" alt="">
</a>
</div>
<!-- Post thumb end -->
<div class="post-content">
<a class="post-cat" href="#">ball</a>
<h2 class="post-title">
<a href="#">title</a>
</h2>
</div>
<!-- Post content end -->
</div>
<!-- Post Overaly Article 1 end -->
<div class="post-overaly-style text-center clearfix">
<div class="post-thumb">
<a href="#">
<img class="img-responsive" src="images/news/tech/gadget1.jpg" alt="">
</a>
</div>
<!-- Post thumb end -->
<div class="post-content">
<a class="post-cat" href="#">ball</a>
<h2 class="post-title">
<a href="#">title</a>
</h2>
</div>
<!-- Post content end -->
</div>
</div>
<!-- Item 1 end -->
<div class="item">
<div class="post-overaly-style text-center clearfix">
<div class="post-thumb">
<a href="#">
<img class="img-responsive" src="images/news/tech/gadget1.jpg" alt="">
</a>
</div>
<!-- Post thumb end -->
<div class="post-content">
<a class="post-cat" href="#">ball</a>
<h2 class="post-title">
<a href="#">title</a>
</h2>
</div>
<!-- Post content end -->
</div>
<!-- Post Overaly Article 1 end -->
<div class="post-overaly-style text-center clearfix">
<div class="post-thumb">
<a href="#">
<img class="img-responsive" src="images/news/tech/gadget1.jpg" alt="">
</a>
</div>
<!-- Post thumb end -->
<div class="post-content">
<a class="post-cat" href="#">ball</a>
<h2 class="post-title">
<a href="#">title</a>
</h2>
</div>
<!-- Post content end -->
</div>
</div>
<!-- Item 2 end -->
我的 wordpress 代码是这样的,但您显示的是一篇文章。 我想根据我在这里发布的图片显示内容。
静态没有问题。
<?PHP while (have_posts()) : the_post(); ?>
<div class="item">
<div class="post-overaly-style text-center clearfix">
<div class="post-thumb">
<a href="<?PHP the_permalink(); ?>">
<?PHP the_post_thumbnail('',array('class' => 'img-responsive')); ?>
</a>
</div>
<div class="post-content">
<a class="post-cat" href="#"><?PHP echo $tabish['sidebar-title']?> </a>
<h2 class="post-title">
<a href="<?PHP the_permalink(); ?>">
<?PHP the_title(); ?>
</a> </h2>
<div class="post-Meta">
<span class="post-date"><?PHP the_time('d M Y'); ?></span>
</div>
</div>
<!-- Post content end -->
</div>
<!-- Post Overaly Article 1 end -->
</div>
<!-- Item 1 end -->
<?PHP endwhile; ?>
根据插入的图片,如何更改wordpress代码以显示插入图片的内容
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。