我如何可以顯示任意一個圖像的小縮略圖或功能的圖像,從每個崗位在我最近的帖子自定義部件WordPress的最新文章顯示縮略圖
這裏是我的代碼:
<?php
include($_SERVER['DOCUMENT_ROOT'] . $root . 'blog/wp-load.php');
$recent_posts = wp_get_recent_posts(array(
'numberposts' => 3
));
?>
<h3 class="divider">Recent Blog Posts</h3>
<ul class="listing">
<?php foreach($recent_posts as $post) { ?>
<li><a href="<?php echo get_permalink($post['ID']) ?>">
<div><?php echo $post['post_title'] ?></div></a></li>
<?php } ?>
</ul>
非常感謝您的幫助! – onebitrocket
歡迎您! :) – Bill