-1
我知道我必须在Wordpress论坛中提问。 但我有点疯了stackoverflow
,我先问这里。 我从头开始开发Wordpress主题。在我的博客文章中,我想将缩略图图像包裹在文本中。 我使用的代码是如何在Wordpress中的文本中包裹缩略图图像?
<div class="row">
<?php if(has_post_thumbnail()): ?>
<div class="col-xs-12 col-sm-4">
<div class="thumbnail"><?php the_post_thumbnail('small'); ?></div>
</div>
<div class="col-xs-12 col-sm-8">
<?php the_content(); ?>
</div>
<?php else: ?>
<div class="col-xs-12">
<?php the_content(); ?>
</div>
<?php endif; ?>
</div>
现在是内容和缩略图图像并排。 我喜欢将图像包裹在文本中。 图片是。
这是关于HTML/CSS而不是WordPress本身 – ThemesCreator