你已经检查gd扩展在php.ini启用与否;延伸=文件php_gd2.dll如果萨米加冒号是exiest然后取出萨米加冒号
和阅读
http://www.roseindia.net/tutorial/php/phpgd/About-thumbnail.html
http://davidwalsh.name/create-image-thumbnail-php
阅读以下网址: -
http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail
http://codex.wordpress.org/Function_Reference/the_post_thumbnail
或
试试这个: -
<?php echo get_the_post_thumbnail($post_id, $size, $attr); ?>
<?php $pages = get_pages(array('child_of' => 1)); ?>
<ul>
<?php foreach ($pages as $page): ?>
<li>
<?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
<h1><?php echo $page->post_title; ?></h1>
<?php echo $page->post_content; ?>
</li>
<?php endforeach; ?>
</ul>
缩略图大小
get_the_post_thumbnail($id); // without parameter -> Thumbnail
get_the_post_thumbnail($id, 'thumbnail'); // Thumbnail
get_the_post_thumbnail($id, 'medium'); // Medium resolution
get_the_post_thumbnail($id, 'large'); // Large resolution
get_the_post_thumbnail($id, 'full'); // Original resolution
get_the_post_thumbnail($id, array(100,100)); // Other resolutions
谢谢您的答复Mr.Abid。但这些主题很好。我为每篇文章设置了“用作精选图片”选项的精选图片。正如我前面所说的那样,在安装php-gd之后,缩略图可以很好地工作几天。但现在他们再次没有出现。现在的情况就像我没有安装php-gd那样。有时甚至会说“建立数据库连接时出错”。当我重新启动服务器时,此数据库错误在一段时间内会消失,但缩略图问题根本无法解决。 – 2012-07-29 13:27:38
你已经勾选了gd extension enable或者不在php.ini; extension = php_gd2.dll如果sami colone是exiest然后删除sami colone – 2012-07-29 13:36:47
在php.ini中没有这样的行。 GD [GD]中唯一的一行是: ; gd.jpeg_ignore_warning = 0 – 2012-07-29 13:55:59