我制作了一个单独的 wordpress 页面来显示我所有的特色图像,它们确实会显示,但我需要帮助来了解如何使它们显示为实际尺寸而不是真正的小图像。
<?php
$the_query = new WP_Query();
$the_query->query("cat=4&nopaging=true");
if ($the_query->have_posts()) :
while($the_query->have_posts()) : $the_query->the_post();
if(has_post_thumbnail()) :
the_post_thumbnail();
endif;
endwhile;
endif;
wp_reset_postdata();
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
?>
<img src='<?php echo $image[0]; ?>' />
那是我现在的代码页面是http://rickwarren.veracitycolab.com/banners/
谢谢!
这就是我的新代码的样子,图像仍然是一样的有什么想法吗?
<?php
$the_query = new WP_Query();
$the_query->query("cat=4&nopaging=true");
if ($the_query->have_posts()) :
while($the_query->have_posts()) : $the_query->the_post();
if(has_post_thumbnail()) :
the_post_thumbnail();
endif;
endwhile;
endif;
wp_reset_postdata();
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
?>