add_theme_support在functions.php上不起作用

在Wordpress上开发新主题时, 我只是注意到add_theme_support对我不起作用。我在头结束之前叫<?php wp_head();?>, 在主体结束之前叫<?php wp_footer();?>。我正在使用Wordpress 4.1.1版。谁能帮我解决这个问题?我尝试了很多次后很累, 但是没有运气:(


#1


你在哪个挂钩上添加了add_theme_support?请尝试after_setup_theme钩子, 如下例所示:

add_action('after_setup_theme', 'my_function_after_setup_theme');
function my_function_after_setup_theme() {
    add_theme_support('automatic-feed-links');
}

来源:

https://www.srcmini02.com/66968.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_36986.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?