在 wordpress 元素或页面中添加 css 和 js 文件的位置
where to add the css and js files in the wordpress elementor pages
我用我的 HTML 创建了 elementor 页面,其中包括重定向到外部 css 和 js 文件。
示例 :
我的元素或页面有 "script src='script.js'"
和 "link rel='stylesheet' href='style.css'"
script.js
文件和 style.css
文件放在哪里?
在您的主题文件夹中创建一个类似 "js" 的目录,并将脚本放在那里。在 code/template 中,路径看起来像
<?php bloginfo('template_directory'); ?>/js/script.js
我用我的 HTML 创建了 elementor 页面,其中包括重定向到外部 css 和 js 文件。
示例 :
我的元素或页面有 "script src='script.js'"
和 "link rel='stylesheet' href='style.css'"
script.js
文件和 style.css
文件放在哪里?
在您的主题文件夹中创建一个类似 "js" 的目录,并将脚本放在那里。在 code/template 中,路径看起来像
<?php bloginfo('template_directory'); ?>/js/script.js