wp_head函数对于要使用插件的主题来说比较重要,一般如果插件需要向主题头部header标签内加入css文件和js文件,都是通过wp_head()函数输出的。在header.php文件的header标签结束标签</header>前面添加:
<head> ..... <?php wp_head(); ?> </head>
附官方原文解析:
<?php ... /* Always have wp_head() just before the closing </head> * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to <head> such * as styles, scripts, and meta tags. */ wp_head(); ?> </head>
1条评论( 网友:1 条,站长:0 条 ) 网友评论{有您的评论更精彩....}