Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用包含重定向到外部 css 和 js 文件的 HTML 的 elementor 页面创建。
示例:
我的 elementor 页面有"script src='script.js'"和"link rel='stylesheet' href='style.css'"
"script src='script.js'"
"link rel='stylesheet' href='style.css'"
script.js文件和文件放在哪里style.css?
script.js
style.css
在您的主题文件夹中创建一个类似“js”的目录并将脚本放在那里。在代码/模板中,路径看起来像
<?php bloginfo('template_directory'); ?>/js/script.js