wordpress的新手,我无法在插件中加载样式表。该效果或它们的效果将被覆盖。这就是我的主要plugin.php文件中的内容:
function load_pc_scripts() {
wp_register_style('plugin-style', plugin_dir_url(__FILE__) . 'plugin-style.css');
wp_enqueue_style('plugin-style');
}
add_action('wp_enqueue_scripts', 'load_pc_scripts');
样式表位于同一目录中,但控制台显示以下内容:
plugin-style.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.1.1:8 JQMIGRATE: Migrate is installed, version 1.4.1
plugin-style.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
options-general.php?page=price-compare-settings:1 Unchecked runtime.lastError: The message port closed before a response was received.
plugin-style.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
答案 0 :(得分:0)
如果控制台显示404,则表明排队工作正常,您可能在一个地方或另一个地方输入了文件名或聚会中的错字