如何修复断页的WordPress模板错误

因此, 我正在一个基于Wordpress的网站上工作。

这是一个使用3个不同主题的多站点安装。

主题包括:DWT列表, WpResidence和Careerfy。

主题, WordPress, 每个都应该已经更新到最新版本。

我一直遇到困扰页面的问题。

尤其是在DWT清单的清单页面上列出了这一清单:

注意:未定义的索引:在第24行的/nas/content/live/cwlife2/wp-content/themes/dwt-listing/template-parts/listing-detial/with_solid/listing-detial-1.php中启用注意:未定义的索引:在第27行的/nas/content/live/cwlife2/wp-content/themes/dwt-listing/template-parts/listing-detial/sidebar/sidebar.php中启用

对导致问题的原因有任何想法吗?


#1


我对主题不熟悉, 但问题是他们在代码中检查要启用的选项。如果未禁用, 则未定义。但是你确定这些通知破坏了你的网站吗?还是还有更多错误?

$layout = $dwt_listing_options['dwt_listing_sidebar-layout-manager']['enabled'];

你可以在该块周围放置一个if语句, 如下所示:

if ( isset( $dwt_listing_options['dwt_listing_sidebar-layout-manager'] ) && isset( $dwt_listing_options['dwt_listing_sidebar-layout-manager']['enabled'] )  )

希望这对你朝正确的方向有所帮助。

来源:

https://www.srcmini02.com/63324.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_41891.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?