我一直在使用下面的代碼來獲取所有的特色圖像的子頁面,然後顯示在旋轉木馬滑塊,但我想要特定的大小= 231 * 130和class = img-responsive。 但我不能夠做到這一點在wordpress中獲取具體的圖像大小
<?php
$mypages = get_pages(array('child_of' => 67, 'sort_column' => 'post_date', 'sort_order' => 'desc'));
foreach($mypages as $page) {
$content = $page->post_content;
if (! $content) // Check for empty page
continue; ?>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="thumbnail">
<a href="<?php echo get_page_link($page->ID); ?>">
<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($page->ID, array(231, 130), array('class' => 'img-responsive img-shadow'))); ?>
<img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>">
</a>
<div class="caption clearfix">
<h4><?php echo $page->post_title; ?></h4>
<a href="<?php echo get_page_link($page->ID); ?>">view all</a>
</div>
</div>
</div>
<?php } ?>
請幫我找出我在做什麼錯
以上標記非常感謝 – terminator