我想让一个插件将CSS样式表和JavaScript JS文件的加载限制为只加载需要的页面。
我的问题的一个例子是插件Contact Form 7 我用它在我的网站上的一个页面上创建了一个表单contact me“页面)。但是,它会在网站上的每个页面/帖子中添加以下行:
<link rel=\'stylesheet\' id=\'contact-form-7-css\' href=\'http://www.r-statistics.com/wp-content/plugins/contact-form-7/styles.css?ver=2.3.1\' type=\'text/css\' media=\'all\' />
<script type=\'text/javascript\' src=\'http://www.r-statistics.com/wp-content/plugins/contact-form-7/scripts.js?ver=2.3.1\'></script>
这让我怀疑这个插件正在影响我的网站的加载时间,因为我只对网站上的一个页面感兴趣。Thus, my question is how can I remove these extra lines from all the pages except for the "Contact Me" page but without deactivating the plugin?