wordpress主题升级出现should be compatible with Walker_Page::start_el错误的解决办法

网站升级php版本到7.1+出现的错误。网站头部出现以下代码。

《wordpress主题升级出现should be compatible with Walker_Page::start_el错误的解决办法》

Warning: Declaration of Walker_Child_Classes::start_el(&$output, $page, $depth, $args, $current_page) should be compatible with Walker_Page::start_el(&$output, $page, $depth = 0, $args = Array, $current_page = 0) in /www/wwwroot/www.***cn/wp-content/themes/***/options/extra.php on line***

Warning: Declaration of Walker_Page_Custom::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /www/wwwroot/www.***.cn/wp-content/themes/***/options/extra.php on line ***

解决办法很简单,在出问题的提示文件里面 themes/***/options/extra.php,修改提示的两个错误。

《wordpress主题升级出现should be compatible with Walker_Page::start_el错误的解决办法》

更改成如下

function start_el(&$output, $page, $depth = 0, $args = array(), $current_page = 0) {

function start_lvl(&$output,$depth = 0, $args = array()) {

《wordpress主题升级出现should be compatible with Walker_Page::start_el错误的解决办法》

然后问题解决。

7.3问题

Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/www.b***e.com/wp-content/themes/s**/cmb/init.php on line 746
点赞