在Wordpress上开发新主题时,我注意到add_theme_support对我不起作用。我在头结束前调用了<?php wp_head();?>
,在正文结束前调用<?php wp_footer();?>
。我使用的是Wordpress 4.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');
}