Php 如何使图像响应引导,并在wordpress上使用它?
我已经厌倦了使用bootstrap使WordPress的特色图像响应。使用引导使映像响应的方法是Php 如何使图像响应引导,并在wordpress上使用它?,php,css,wordpress,twitter-bootstrap,Php,Css,Wordpress,Twitter Bootstrap,我已经厌倦了使用bootstrap使WordPress的特色图像响应。使用引导使映像响应的方法是 <img src="..." class="img-responsive" alt="Responsive image"> 我厌倦了在wordpress中动态显示特色图像时使用这种方法 <img src="<?php the_post_thumbnail( 'jumbo_thumbnail'); ?>" class="img-responsive" alt="Re
<img src="..." class="img-responsive" alt="Responsive image">
我厌倦了在wordpress中动态显示特色图像时使用这种方法
<img src="<?php the_post_thumbnail( 'jumbo_thumbnail'); ?>" class="img-responsive" alt="Responsive image">
“class=“img responsive”alt=“responsive image”>
但是它不起作用。我知道如果我在那里放置链接而不是
,它会起作用。但是我动态地获取特征图像,而这种方法不起作用。你很接近了。完全去掉你的img
标记,然后使用以下方法:
<?php
the_post_thumbnail( 'jumbo_thumbnail', array(
'alt' => 'Responsive image',
'class' => 'img-responsive'
) );
?>
功能将为您输出img
标签