报错:d constant gallerytag – assumed ‘gallerytag’ (this will throw an Error in a future version of PHP) in
导读针对 WordPress 主题中因未定义常量引发的 PHP 警告,本教程聚焦 gallerytag、videotag、taotag 三处报错的定位与修复。内容涵盖报错成因分析、post-type.php 对应行数的查找方法,以及为字符串补加引号的具体操作。
报错详情:
d constant gallerytag – assumed ‘gallerytag’ (this will throw an Error in a future version of PHP) in /www/wwwroot/ceshi.a8ymw.top/wp-content/themes/azzxx/inc/post-type.php on line 169 Warning: Use of undefined constant videotag – assumed ‘videotag’ (this will throw an Error in a future version of PHP) in /www/wwwroot/ceshi.a8ymw.top/wp-content/themes/azzxx/inc/post-type.php on line 271 Warning: Use of undefined constant taotag – assumed ‘taotag’ (this will throw an Error in a future version of PHP) in /www/wwwroot/ceshi.a8ymw.top/wp-content/themes/azzxx/inc/post-type.php on line 374
解决方案:
找到对应的行数在字符串内加上 引号,示列如下
'taxonomy' => 'gallerytag',
保存,刷新页面,问题解决!





![表情[qiang]-A8源码网](https://www.a8ymw.com/wp-content/themes/zibll/img/smilies/qiang.gif)
,谁懂
没有回复内容