wordpress元网格插件中未显示小缩略图图像

wordpress元网格插件中未显示小缩略图图像,wordpress,thumbnails,Wordpress,Thumbnails,缩略图位于媒体网格插件->网格生成器->从网格列表中选择任意网格->在“选择项目”下拉列表前面的小缩略图中 缩略图图像不会在线显示,但可以在本地正常工作。 你能告诉我从哪里开始吗? 这里是图片 对于裁剪缩略图图像,您可能认为这不是使用插件的正确方法: 试试这段代码,它将帮助你在整个网站的所有其他缩略图 将此代码放入function.php文件中 if ( function_exists( 'add_image_size' ) ) { add_image_size( 'custom-po

缩略图位于媒体网格插件->网格生成器->从网格列表中选择任意网格->在“选择项目”下拉列表前面的小缩略图中

缩略图图像不会在线显示,但可以在本地正常工作。 你能告诉我从哪里开始吗? 这里是图片

对于裁剪缩略图图像,您可能认为这不是使用插件的正确方法:

试试这段代码,它将帮助你在整个网站的所有其他缩略图

将此代码放入
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; ?>

谢谢