我製作了一個單獨的wordpress頁面來顯示我所有的精選圖片,但他們確實顯示,但我需要幫助他們如何使其顯示爲實際大小而不是真正的小圖片。在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');
?>
謝謝,我會給它一個機會! :d – jrojas