问题描述
我做了动态,但它显示在一个项目中。 我想垂直显示 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 (将#修改为@)