Php _post_缩略图返回超链接外部
当我使用Php _post_缩略图返回超链接外部,php,wordpress,wordpress-theming,Php,Wordpress,Wordpress Theming,当我使用获取文章缩略图时,它会返回中的特征图像默认大小。获取摘录($limit)。; 结束时; 回声“”; endif; wp_reset_query();?> 如果您阅读此处的文档,您将看到该函数与大多数以“the”开头的wp函数一样,会立即执行“echo”。因此,请使用或将代码更改为: echo '<span><li><a href="'.get_the_permalink().'">' ; the_post_thumbnail('shapely-grid
获取文章缩略图时,它会返回中的特征图像默认大小。获取摘录($limit)。;
结束时;
回声“”;
endif;
wp_reset_query();?>
如果您阅读此处的文档,您将看到该函数与大多数以“the”开头的wp函数一样,会立即执行“echo”。因此,请使用或将代码更改为:
echo '<span><li><a href="'.get_the_permalink().'">' ;
the_post_thumbnail('shapely-grid');
echo ' '.get_the_title().'</a> <p>' .get_the_excerpt($limit).'</p></li></span>';
echo'”。获取摘录($limit)。 ;
echo '<span><li><a href="'.get_the_permalink().'">' ;
the_post_thumbnail('shapely-grid');
echo ' '.get_the_title().'</a> <p>' .get_the_excerpt($limit).'</p></li></span>';