Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/273.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php _post_缩略图返回超链接外部_Php_Wordpress_Wordpress Theming - Fatal编程技术网

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>';