【发布时间】:2013-11-06 14:55:00
【问题描述】:
缩略图在 Media-Grid 插件中 -> Grid Builder -> 从网格列表中选择任何网格 ->“选择项目”下拉列表前面的小缩略图
缩略图图像不会在线显示,但在本地可以正常工作。 你能告诉我从哪里开始吗? 这是图像 enter link description here
【问题讨论】:
标签: wordpress thumbnails
缩略图在 Media-Grid 插件中 -> Grid Builder -> 从网格列表中选择任何网格 ->“选择项目”下拉列表前面的小缩略图
缩略图图像不会在线显示,但在本地可以正常工作。 你能告诉我从哪里开始吗? 这是图像 enter link description here
【问题讨论】:
标签: wordpress thumbnails
为了裁剪缩略图,你不适合使用插件:
尝试使用此代码,它将帮助您制作整个网站中的所有其他缩略图...
将此代码放入您的function.php 文件中
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'custom-post-thumb', 140, 140,true );
}
现在在您的代码中使用它:
<?php if ( has_post_thumbnail()) : ?>
<?php the_post_thumbnail('custom-post-thumb', array('class' => 'attachment')); // here array('class' => 'attachment') apply if you want to apply class to that anchor tag ?>
<?php endif; ?>
谢谢
【讨论】: