我正在使用此代码显示子页面的功能图像;
<?
$child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT');
if ( $child_pages ) :
foreach ( $child_pages as $pageChild ) :
setup_postdata( $pageChild );
$thumbnail = get_the_post_thumbnail($pageChild->ID, 'thumbnail');
if($thumbnail == "") continue; // Skip pages without a thumbnail
?>
<div class="child-thumb">
<a href="<?= get_permalink($pageChild->ID) ?>" rel="bookmark" title="<?= $pageChild->post_title ?>">
<?= $pageChild->post_title ?><br /><?= $thumbnail ?>
</a>
</div>
<?
endforeach;
endif;
?>
我也希望在父页面上显示特色图片的描述。
仅供参考,这是网页;
http://storyville.jonmarkoff.com/storyvillewp/our-work/
谢谢!