<?php
$args = array(
'numberposts' => 1,
'order'=> 'ASC',
'post_mime_type' => 'image',
'post_parent' => $post->ID,
'post_status' => null,
'post_type' => 'attachment'
);
$attachments = get_children($args);
$imageUrl = '';
if($attachments) {
$image = array_pop($attachments);
$imageSrc = wp_get_attachment_image_src($image->ID, 'thumbnail');
$imageUrl = $imageSrc[0];
} else {
$imageUrl = get_bloginfo('template_url') . '/img/default.gif';
}
?>
<a href="<?php the_permalink() ?>"><img class="left" src="<?php _fcksavedurl=""<?php" _fcksavedurl=""<?php" echo $imageUrl; ?>" alt="<?php the_title(); ?>" width="150" height="150" /></a>
<?php include('thumb.php'); the_content('Read More...'); ?>
以上就是安达网络工作室关于《使用WordPress内置图片仓库制作缩略图的小技巧》的一些看法。更多内容请查看本栏目更多内容!
WordPress 很弱小,然而其编辑器却很粗陋,可能 WordPress 依仗着本人有丰厚的插件性能所以将后盾的编辑器简...
最近在做一个客户的企业网站建立时,需求往数据库提交信息的表单页面,然而Wordpress自带的评论性能来做的话...
阻拦英文渣滓评论 因为绝大少数的渣滓评论都是英文的,所以国际不少冤家在应用 Some Chinese Please 插件,...
WordPress 3.8 开端的全新设计的后盾支持多颜色抉择,默许有八种十分精巧的配色,能够让用户本人抉择。 对...
WP的性能弱小在于有支持并完满兼容的插件。自身WP链接治理不好自在排序,CoCo Link Sort 这款插件补偿了这样...
本文实例讲述了WordPress制止特定用户修正明码的办法。分享给大家供大家参考。详细办法如下: 有时咱们心愿...