10年专业网络服务供应商

新闻资讯

互联网新闻源,了解更多行业纵深观点

当前位置:首页 > 资讯 > 网站开发

wordpress错误提示:WP_Error could not be converted to string

时间:2019-10-22 15:30来源:无锡做网站公司

摘要:wordpress以其开源可扩展性等优点在全球赢得了很多用户,但是任何一个成熟的软件产品难免会出现一些错误,今天我们讲解的是WP_Error could not be converted to string错误提示:


  Object of class WP_Error could not be converted to string in <b>/www/wwwroot/网址/wp-content/themes/Relive/public/utils.php on line 533

    这个错误提示从页面上看,咱们可以相应地找到错误发生的文件第533行

    echo ' &raquo; '. get_category_parents( $category_id, TRUE, "  &raquo; " );

    解决方案

    将533行的代码 echo ' &raquo; '. get_category_parents( $category_id, TRUE, "  &raquo; " );替换为如下的:

    echo is_wp_error( $cat_parents = get_category_parents($category_id, TRUE, '' . $delimiter . '') ) ? '' : $cat_parents;

    那么这样页面上出现的错误提示将得到根本性解决。


声明:除非注明,本站内容由无锡网站建设马氪软件原创发布©,转载请联系我们授权合作。

感谢您耐心阅读,祝好!
 您阅读这条内容,共花了: 

给这篇内容写个评语吧!

wordpress错误提示:WP_Error could not be converted to string
wordpress以其开源可扩展性等优点在全球赢得了很多用户,但是任何一个成熟的软件产品难免会出现一些错误,今天我们讲解的是WP_Error could not be converted to string错误提示:
发布时间:2019-10-22
© 第二秀网络科技有限公司
长按识别二维码查看详细内容