-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