我在 wordpress 中创建了一个可过滤的投资组合,遵循我找到的流沙教程。
一切正常,但作者没有在页面模板中链接特色图片,也没有为帖子类型设置缩略图大小。我希望缩略图大小为280px x 180px
.
这是代码:(下面编辑了工作代码)
<ul class="portfolio-grid">
<?php
$pfportfolio = new WP_Query( 'post_type=portfolio' );
while ( $pfportfolio->have_posts() ) : $pfportfolio->the_post();?>
<?php
echo '<li data-id="post-'.get_the_ID().'" data-type="'.$terms_as_text = strip_tags( get_the_term_list( $post->ID, 'pftype', '', ' ', '' ) ).'">';
?>
<div class="item">
<div class="view third-effect">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_post_thumbnail( 'homepage-thumb' ); ?></a>
<?php
?>
<div class="mask">
</div>
<div class="item-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></div>
</div>
</div>
<?php
echo '</li>';
endwhile;
wp_reset_postdata();
?>
</ul>