<?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内置图片仓库制作缩略图的小技巧》的一些看法。更多内容请查看本栏目更多内容!
1、wp_nav_menu()函数引见:worpdress倒退到3.0当前添加了一个自定义菜单函数wp_nav_menu(),使得wordpress...
此时假如上传一个不在预约义的平安扩大名列表,如.lrc,会报错: File type does not meet security guidel...
当然 Wordpress 2.7 里有“小工具”选项也能管制 Widget ,然而重复试验后发现款式无奈对立,可控...
其次要用处是经过该办法, 完成后盾的生成菜枯燥用。 应用该性能之前,必需激活主题3.0+菜单性能。 办法如下...
1. 自定义用户名和明码 新版本一开端就会给用户惊喜! 目前咱们装置WordPress之后,零碎会给咱们一个用户ad...
本文实例讲述了WordPress后盾删除不需求的侧边栏菜双方法。分享给大家供大家参考。 详细完成办法是在以后主...