我真的想在我的模板文件中运行一个简单的代码。
E、 如果我在我的页面上放了这样的东西。php:
<script type="text/javascript">
jQuery(document).ready(function($) {
alert("Hello world!");
});
</script>
它不起作用了。但简单的javascript正在发挥作用:
<script type="text/javascript">
alert("Hello world!");
</script>
Why is jQuery blocked in WP to be included in template files?
也许还有更重要的问题WHERE IN THE WP SETTINGS CAN I RE-ENABLE THIS?
我知道我可以使用wp\\u register\\u脚本等,但在我的场景中,我需要在模板文件中粘贴简单的javascript代码。How to allow load jQuery code snippets in WP template\'s file too?
为什么它甚至被封锁了?