<分区>
我想在其他 div 中显示帖子的图像,然后在内容的 div 中显示。
我的意思是这样的。
<div class="latest-posts">
<div class="latest-posts-info">
<div class="title"><h1>HERE IS TITLE<h1></div>
<div class="text">HERE IS CONTENT</div>
<a href="#" class="read-more">Read more...</a>
<div class="clear"></div>
</div>
<div class="latest-posts-img">HERE I WANT THE IMAGE</div>
<div class="clear"></div>
</div>
在 wp admin 中添加帖子时,我注意到这是唯一的方法,即在内容中显示图像。
谢谢
最佳答案
查看此页面:http://codex.wordpress.org/Function_Reference/the_post_thumbnail
<div class="latest-posts-img"> <?php the_post_thumbnail( $size, $attr ); ?> </div>
关于php - 在其他 div 中显示图像 - wordpress,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18483906/