我非常感谢您的帮助,我在列表项中写了一个循环,但我希望在缩略图上设置宽度和高度,并显示一些专家级的“文本”,但限制其长度。。。
<ul>
<!-- Define our WP Query Parameters -->
<?php $the_query = new WP_Query( \'posts_per_page=3\' ); ?>
<!-- Start our WP Query -->
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<li>
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail(\'large\');
}
?>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</li>
<!-- Repeat the process and reset once it hits the limit -->
<?php
endwhile;
wp_reset_postdata();
?>
</ul>