日主题升级至ripro6.7后打开首页出现 CaoCache wwwroot/wp-content/themes/ripro/parts/home-mode/lastpost.php:11 解决方法
最新RIPRO主题下载: https://www.sharecode.site/1971.html
if (CaoCache::is()) {
$_the_cache_key = 'ripro_home_last_posts_'.$args['paged'];
$_the_cache_data = CaoCache::get($_the_cache_key);
if(false === $_the_cache_data ){
$_the_cache_data = new WP_Query($args); //缓存数据
CaoCache::set($_the_cache_key,$_the_cache_data);
}
$psots_data = $_the_cache_data;
}else{
$psots_data = new WP_Query($args); //原始输出
}
替换为以下代码
// if (CaoCache::is()) {
// $_the_cache_key = 'ripro_home_last_posts_'.$args['paged'];
// $_the_cache_data = CaoCache::get($_the_cache_key);
// if(false === $_the_cache_data ){
// $_the_cache_data = new WP_Query($args); //缓存数据
// CaoCache::set($_the_cache_key,$_the_cache_data);
// }
// $psots_data = $_the_cache_data;
// }else{
$psots_data = new WP_Query($args); //原始输出
// }
这样就解决了更新主题后 打开首页 显示 lastpost.php 11行 的CaoCache 报错问题。
① 本网站名称及网址:分享源码网 | ShareCode.SITE。
② 本网站资源来源于网络收集,如有侵权,请联系站长进行删除处理。
③ 分享目的仅供大家学习和交流,请不要用于商业用途,否则后果自负。
④ 如果你也有好源码或者教程,可以联系小编,有钻石奖励和额外收入。
⑤ 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解。
⑥ 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需。
⑦ 本站资源大多存储在云盘,如发现链接失效请反馈我们会第一时间更新。
分享源码网 » 日主题升级至ripro6.7后打开首页出现 CaoCache wwwroot/wp-content/themes/ripro/parts/home-mode/lastpost.php:11 解决方法
② 本网站资源来源于网络收集,如有侵权,请联系站长进行删除处理。
③ 分享目的仅供大家学习和交流,请不要用于商业用途,否则后果自负。
④ 如果你也有好源码或者教程,可以联系小编,有钻石奖励和额外收入。
⑤ 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解。
⑥ 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需。
⑦ 本站资源大多存储在云盘,如发现链接失效请反馈我们会第一时间更新。
分享源码网 » 日主题升级至ripro6.7后打开首页出现 CaoCache wwwroot/wp-content/themes/ripro/parts/home-mode/lastpost.php:11 解决方法